:root {
  --realm-sky:#c99a50;
  --realm-night:#c8cbd5;
  --realm-earth:#806044;
  --realm-forest:#456a3a;
  --realm-water:#3f7393;
  --realm-underworld:#a34230;
}

.catalog-shell { max-width:1280px; margin:0 auto; padding:3.5rem 1rem 5rem; }
#page-stones > .max-w-5xl,#page-stones > .max-w-4xl,#page-stones > .text-center,#page-shop > .max-w-5xl { display:none; }
.catalog-intro { max-width:760px; margin:0 auto 2rem; color:var(--muted); font-size:0.9rem; line-height:1.8; text-align:justify; }
.stone-reveal-intro { position:relative; max-width:940px; margin:0 auto 3rem; padding:clamp(1.4rem,4vw,2.6rem); border:1px solid rgba(196,132,90,.46); border-radius:18px; background:linear-gradient(145deg,rgba(25,21,16,.9),rgba(8,7,4,.96)); box-shadow:0 20px 58px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.04); }
.stone-reveal-intro::before { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:radial-gradient(circle at 50% 0%,rgba(201,168,76,.12),transparent 42%); }
.stone-reveal-kicker { position:relative; margin-bottom:.4rem; color:var(--sandstone); font-size:.65rem; font-weight:800; letter-spacing:.18em; text-align:center !important; text-transform:uppercase; }
.stone-reveal-title { position:relative; margin-bottom:1.5rem; color:var(--txt); font-family:'Playfair Display',serif; font-size:clamp(2rem,5vw,3.4rem); line-height:1; text-align:center; text-shadow:0 0 24px rgba(255,208,128,.2); }
.stone-reveal-intro > p:not(.stone-reveal-kicker):not(.stone-reveal-signature) { position:relative; margin-top:1.15rem; color:#ded7cb; font-size:clamp(.82rem,1.4vw,.94rem); line-height:1.9; text-align:justify; text-justify:inter-word; hyphens:auto; }
.stone-reveal-signature { position:relative; margin-top:1.15rem; color:var(--sandstone); font-family:'Playfair Display',serif; font-size:.95rem; font-style:italic; text-align:right !important; }
.stone-reveal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(1rem,4vw,2.5rem); max-width:760px; margin:0 auto 1.25rem; }
.stone-reveal-choice { display:flex; align-items:center; flex-direction:column; gap:1rem; }
.stone-reveal-slot { --slot-color:var(--sandstone); position:relative; display:grid; place-items:center; width:min(100%,150px); aspect-ratio:3/4; overflow:hidden; border:2px solid var(--slot-color); border-radius:8px; padding:1rem; background:radial-gradient(circle at 48% 32%,color-mix(in srgb,var(--slot-color) 25%,transparent),transparent 38%),linear-gradient(160deg,#242016,#080704); box-shadow:0 15px 35px rgba(0,0,0,.42),0 0 22px color-mix(in srgb,var(--slot-color) 16%,transparent); color:color-mix(in srgb,var(--slot-color) 80%,#fff); text-align:center; }
.stone-reveal-slot::before { content:"◇"; position:absolute; color:var(--slot-color); font-family:'Playfair Display',serif; font-size:4rem; opacity:.13; transform:rotate(45deg); }
.stone-reveal-slot::after { content:""; position:absolute; inset:7px; border:1px solid color-mix(in srgb,var(--slot-color) 40%,transparent); border-radius:4px; }
.stone-reveal-slot span { position:relative; z-index:1; font-size:.62rem; font-weight:700; letter-spacing:.09em; line-height:1.5; text-transform:uppercase; }
.stone-reveal-protection .stone-reveal-slot { --slot-color:var(--realm-earth); }
.stone-reveal-vision .stone-reveal-slot { --slot-color:var(--realm-sky); }
.stone-reveal-flow .stone-reveal-slot { --slot-color:var(--realm-water); }
.stone-reveal-choice .catalog-filter { width:100%; max-width:180px; }
.stone-all-toolbar { margin-top:.5rem; }
.catalog-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:0.65rem; margin:0 auto 2rem; }
.catalog-filter { border:1px solid var(--border); border-radius:999px; padding:0.65rem 1.05rem; background:rgba(16,14,8,0.86); color:var(--muted); font-size:0.74rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; cursor:pointer; transition:transform .2s ease,border-color .2s ease,color .2s ease,background .2s ease; }
.catalog-filter:hover,.catalog-filter:focus-visible { transform:translateY(-2px); border-color:var(--sandstone); color:var(--txt); outline:none; }
.catalog-filter.is-active { color:#080603; border-color:var(--sandstone); background:linear-gradient(135deg,#d4a56b,#7acc4a); }
.shop-statement { position:relative; max-width:900px; margin:0 auto 2.25rem; padding:clamp(1.25rem,3.5vw,2.25rem); overflow:hidden; border:1px solid rgba(196,132,90,.42); border-left:4px solid var(--sandstone); border-radius:16px; background:linear-gradient(145deg,rgba(25,21,16,.92),rgba(8,7,4,.96)); box-shadow:0 18px 50px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.04); }
.shop-statement::before { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:radial-gradient(circle at 50% 0%,rgba(201,168,76,.12),transparent 46%); }
.shop-statement-text { position:relative; margin:0; color:#ded7cb; font-size:clamp(.84rem,1.4vw,.96rem); line-height:1.95; text-align:justify; text-justify:inter-word; hyphens:auto; }
.shop-statement-text em { color:var(--sandstone); font-family:'Playfair Display',serif; font-size:1.06em; font-style:italic; white-space:nowrap; }

.product-search-wrap { max-width:640px; margin:0 auto 2rem; }
.product-search-label { display:block; margin-bottom:.5rem; color:var(--sandstone); font-size:.64rem; font-weight:800; letter-spacing:.16em; text-align:center; text-transform:uppercase; }
.product-search-field { position:relative; display:flex; align-items:center; }
.product-search-icon { position:absolute; left:.95rem; color:var(--sandstone); opacity:.8; pointer-events:none; }
.product-search { width:100%; border:1px solid var(--sandstone); border-radius:999px; padding:.85rem 3rem; background:var(--raised); color:var(--txt); font-size:.84rem; outline:none; transition:box-shadow .2s ease,border-color .2s ease; }
.product-search::placeholder { color:var(--muted); }
.product-search:focus { border-color:#d4a56b; box-shadow:0 0 0 3px rgba(196,132,90,.2); }
.product-search::-webkit-search-cancel-button { display:none; }
.product-search-clear { position:absolute; right:.6rem; display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:50%; background:rgba(196,132,90,.16); color:var(--txt); font-size:1.15rem; line-height:1; cursor:pointer; transition:background .2s ease; }
.product-search-clear:hover,.product-search-clear:focus-visible { background:rgba(196,132,90,.34); outline:none; }
.product-search-count { min-height:1.2rem; margin-top:.65rem; color:var(--muted); font-size:.7rem; text-align:center; }

.catalog-status { min-height:1.5rem; margin-bottom:1.25rem; color:var(--muted); font-size:0.72rem; text-align:center; }
.catalog-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:1rem; align-items:stretch; }
.catalog-group + .catalog-group { margin-top:3.5rem; }
.catalog-group-title { display:flex; align-items:center; gap:0.9rem; margin-bottom:1rem; color:var(--txt); font-family:'Playfair Display',serif; font-size:clamp(1.4rem,3vw,2rem); }
.catalog-group-title::after { content:""; height:1px; flex:1; background:linear-gradient(90deg,var(--sandstone),transparent); opacity:.65; }
.catalog-card { --realm-line:var(--realm-earth); position:relative; display:grid; grid-template-columns:42% 1fr; min-height:245px; overflow:hidden; border:1px solid var(--realm-line); border-radius:16px; background:linear-gradient(145deg,rgba(25,21,16,.96),rgba(8,7,4,.98)); box-shadow:0 16px 45px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.04); cursor:pointer; isolation:isolate; transition:transform .25s ease,box-shadow .25s ease; }
.catalog-card::before { content:""; position:absolute; inset:-80%; z-index:-1; background:conic-gradient(from 20deg,transparent,rgba(255,255,255,.055),transparent 24%); animation:catalog-drift 12s linear infinite; }
.catalog-card::after { content:""; position:absolute; inset:0; z-index:-1; background:radial-gradient(circle at 15% 10%,color-mix(in srgb,var(--realm-line) 22%,transparent),transparent 42%); }
.catalog-card:hover,.catalog-card:focus-visible { transform:translateY(-5px); box-shadow:0 22px 55px rgba(0,0,0,.52),0 0 24px color-mix(in srgb,var(--realm-line) 28%,transparent); outline:none; }
@keyframes catalog-drift { to { transform:rotate(360deg); } }
.catalog-card-image-wrap { position:relative; min-height:100%; overflow:hidden; background:#0c0a06; }
.catalog-card-image { width:100%; height:100%; min-height:245px; object-fit:cover; transition:transform .5s ease; }
.catalog-card:hover .catalog-card-image { transform:scale(1.045); }
.catalog-card-placeholder { display:grid; place-items:center; width:100%; height:100%; min-height:245px; color:var(--realm-line); font-family:'Playfair Display',serif; font-size:2.6rem; }
.catalog-card-body { display:flex; flex-direction:column; min-width:0; padding:1.15rem; }
.catalog-eyebrow { color:var(--realm-line); font-size:.64rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.catalog-title { margin:.45rem 0 .55rem; color:var(--txt); font-family:'Playfair Display',serif; font-size:1.05rem; line-height:1.25; }
.catalog-myth { display:-webkit-box; overflow:hidden; margin-bottom:.8rem; color:#d8d1c5; font-size:.74rem; line-height:1.6; text-align:justify; -webkit-box-orient:vertical; -webkit-line-clamp:4; }
.catalog-colors { margin:-.2rem 0 .75rem; color:var(--muted); font-size:.66rem; line-height:1.5; }
.catalog-card-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.65rem; margin-top:auto; }
.catalog-price { color:var(--txt); font-family:'Playfair Display',serif; font-size:1rem; font-weight:700; }
.catalog-etsy-link { display:inline-flex; align-items:center; justify-content:center; min-height:38px; border-radius:8px; padding:.55rem .75rem; background:linear-gradient(135deg,#7acc4a,#4e7a2e); color:#050302; font-size:.68rem; font-weight:800; text-decoration:none; }
.catalog-empty { grid-column:1/-1; border:1px dashed var(--border); border-radius:16px; padding:2.5rem 1.5rem; background:rgba(16,14,8,.62); color:var(--muted); text-align:center; }

.product-modal { position:fixed; inset:0; z-index:2400; display:none; align-items:center; justify-content:center; padding:1rem; background:rgba(2,2,1,.86); backdrop-filter:blur(12px); }
.product-modal.is-open { display:flex; }
.product-modal-panel { --realm-line:var(--realm-earth); position:relative; display:grid; grid-template-columns:minmax(260px,.9fr) minmax(300px,1.1fr); width:min(980px,100%); max-height:min(88vh,820px); overflow:auto; border:1px solid var(--realm-line); border-radius:20px; background:linear-gradient(145deg,#191510,#090704); box-shadow:0 30px 90px rgba(0,0,0,.72),0 0 38px color-mix(in srgb,var(--realm-line) 20%,transparent); }
.product-modal-media { min-height:420px; background:#080704; }
.product-modal-media img { width:100%; height:100%; min-height:420px; object-fit:cover; }
.product-modal-copy { padding:clamp(1.4rem,4vw,2.5rem); }
.product-modal-close { position:absolute; top:.8rem; right:.8rem; z-index:2; display:grid; place-items:center; width:42px; height:42px; border:1px solid rgba(255,255,255,.2); border-radius:50%; background:rgba(5,3,2,.82); color:var(--txt); font-size:1.3rem; cursor:pointer; }
.product-modal-realm { color:var(--realm-line); font-size:.68rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.product-modal-title { margin:.45rem 0 1rem; color:var(--txt); font-family:'Playfair Display',serif; font-size:clamp(1.8rem,4vw,2.8rem); line-height:1.08; }
.product-modal-description,.product-modal-story { color:#d7d0c3; font-size:.82rem; line-height:1.8; text-align:justify; white-space:pre-line; }
.product-modal-story { margin-top:1.25rem; padding-top:1.25rem; border-top:1px solid color-mix(in srgb,var(--realm-line) 58%,transparent); }
.product-modal-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1.5rem; }
.product-modal-price { font-family:'Playfair Display',serif; font-size:1.25rem; font-weight:700; }
.product-modal-buy { border-radius:9px; padding:.8rem 1.1rem; background:var(--realm-line); color:#080603; font-size:.75rem; font-weight:800; text-decoration:none; }

.bookstore-search-wrap { position:sticky; top:72px; z-index:12; margin-bottom:2rem; padding:.75rem; border:1px solid var(--border); border-radius:14px; background:rgba(5,3,2,.9); backdrop-filter:blur(12px); }
.bookstore-search { width:100%; border:1px solid var(--sandstone); border-radius:10px; padding:.85rem 1rem; background:var(--raised); color:var(--txt); font-size:.82rem; outline:none; }
.bookstore-search:focus { box-shadow:0 0 0 3px rgba(196,132,90,.18); }
#page-realms .book-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:1rem; align-items:start; }
#page-realms .book-row { display:flex; flex-direction:column; gap:.65rem; height:100%; padding:.75rem; border:1px solid var(--border); border-radius:12px; background:linear-gradient(145deg,rgba(25,21,16,.9),rgba(10,8,5,.95)); transition:transform .2s ease,border-color .2s ease; }
#page-realms .book-row:hover { transform:translateY(-4px); border-color:var(--sandstone); }
#page-realms .book-thumb { display:flex; align-items:center; justify-content:center; width:100%; height:190px; border:0; border-radius:8px; background:#0b0906; }
#page-realms .book-thumb img { width:100%; height:100%; object-fit:contain; }
#page-realms .book-thumb.thumb-missing { height:190px; }
#page-realms .book-text { display:block; font-size:.72rem; line-height:1.45; text-align:center; }
#page-realms .book-text .book-note { margin-top:.45rem; font-size:.64rem; line-height:1.45; text-align:justify; }
#page-realms .book-row.is-book-hidden { display:none; }
.book-search-empty { display:none; color:var(--muted); font-size:.8rem; text-align:center; }
.book-search-empty.is-visible { display:block; }

#page-pilgrim .realm-line-sky { border-color:var(--realm-sky) !important; }
#page-pilgrim .realm-line-night { border-color:var(--realm-night) !important; }
#page-pilgrim .realm-line-earth { border-color:var(--realm-earth) !important; }
#page-pilgrim .realm-line-forest { border-color:var(--realm-forest) !important; }
#page-pilgrim .realm-line-water { border-color:var(--realm-water) !important; }
#page-pilgrim .realm-line-underworld { border-color:var(--realm-underworld) !important; }

@media(max-width:760px) {
  .stone-reveal-grid { gap:.8rem; }
  .stone-reveal-choice .catalog-filter { padding:.6rem .45rem; font-size:.63rem; }
  .product-modal-panel { grid-template-columns:1fr; }
  .product-modal-media,.product-modal-media img { min-height:260px; max-height:42vh; }
  #page-realms .book-gallery { grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:.75rem; }
  #page-realms .book-thumb,#page-realms .book-thumb.thumb-missing { height:165px; }
}
@media(max-width:430px) {
  .catalog-shell { padding-inline:.75rem; }
  .product-search { padding-inline:2.6rem; font-size:.8rem; }
  .shop-statement-text em { white-space:normal; }
  .stone-reveal-grid { grid-template-columns:1fr; gap:1.75rem; }
  .stone-reveal-slot { width:150px; }
  .catalog-card { grid-template-columns:1fr; }
  .catalog-card-image,.catalog-card-placeholder { min-height:210px; height:210px; }
  .catalog-myth { -webkit-line-clamp:3; }
  .product-modal-actions { align-items:stretch; flex-direction:column; }
  .product-modal-buy { text-align:center; }
}
@media(prefers-reduced-motion:reduce) {
  .catalog-card::before { animation:none; }
  .catalog-card,.catalog-card-image { transition:none; }
}
