/* Ink surfaces and editorial layout. Calculation and access gates stay in JS. */
body [data-prelaunch-paid] { font:inherit; cursor:default; box-shadow:none; }
html body.sjm-home button.full-edition-link[data-prelaunch-paid]:disabled { display:block; width:100%; background:transparent !important; border:0; padding:16px 0 0; text-align:left; color:#A39B8F !important; font-size:13px; }
html body.product-page button.product-buy[data-prelaunch-paid]:disabled { display:block; width:100%; min-height:52px; padding:16px; font:inherit; border-radius:3px; color:#D7C9AE !important; -webkit-text-fill-color:#D7C9AE !important; background:#342E21 !important; }
:root {
  --night-bg:#0D0C0B; --night-card:#161412; --night-raised:#161412;
  --night-text:#F2EDE4; --night-muted:#A39B8F; --night-gold:#D4AF37;
  --night-gold-light:#D4AF37; --night-line:rgba(212,175,55,.18);
  --night-gradient:linear-gradient(110deg,#D4AF37,#D4AF37);
  color-scheme:dark;
}
html { background:#0D0C0B !important; }
html body { max-width:860px !important; background:#0D0C0B !important; color:#F2EDE4 !important; }
body .sjm-header { max-width:860px; background:#0D0C0B !important; }
body :is(.sjm-header,.sjm-common-footer,.sjm-bottom-nav) { border-color:rgba(212,175,55,.18) !important; }
body .sjm-bottom-nav { max-width:860px; }
body .sjm-mobile-drawer { right:0; }
body .sjm-menu-backdrop { left:0; right:0; }
body :is(input,select,textarea) { color-scheme:dark; caret-color:#D4AF37; }
body input:is([type="radio"],[type="checkbox"]) { background-color:#161412 !important; color:#F2EDE4 !important; accent-color:#D4AF37; }
html body[data-sjm-page="lifetime"] #input-panel #birth-submit-button { background-image:none !important; background-color:#D4AF37 !important; color:#0D0C0B !important; }
body input::placeholder,body textarea::placeholder { color:#A39B8F !important; opacity:1; }
body :is(.primary-btn,.primary-button,.product-cta,#birth-submit-button,.service-intro-start),
body[data-sjm-page="lifetime"] .lifetime-lock-footer .paid-launch-action button {
  background:#D4AF37 !important; color:#0D0C0B !important; border-color:#D4AF37 !important;
}
body button:disabled,body .primary-btn:disabled,body .primary-button:disabled,body #birth-submit-button:disabled,
body[data-sjm-page="lifetime"] .lifetime-lock-footer button:disabled { opacity:1 !important; background:#342E21 !important; color:#D7C9AE !important; border-color:#655D50 !important; }
body :is(.field-error,.input-error,.error-message,[role="alert"]) { color:#F2EDE4; }
body .field-error:not(:empty) { border-left:2px solid #B84237; padding-left:10px; }
body :is(.hero-title,.hero-title span) { -webkit-text-fill-color:#F2EDE4 !important; }
body :is(.skip-link,.skip-link:focus) { background:#161412; color:#F2EDE4; }

/* The painting reaches the viewport edge; all copy stays in the reading column. */
body.sjm-home .home-hero { position:relative; isolation:isolate; min-height:650px; padding:270px 24px 38px; display:flex; flex-direction:column; justify-content:flex-end; }
body.sjm-home .hero-scene { position:absolute; top:0; bottom:0; left:50%; transform:translateX(-50%); width:100vw; height:100%; min-height:0; z-index:-1; overflow:hidden; }
body.sjm-home .hero-image { position:absolute; inset:0; width:100%; height:100%; max-width:none; object-fit:cover; object-position:50% 48%; mask-image:none; mix-blend-mode:normal; filter:none; }
body.sjm-home .hero-scene::after { content:""; position:absolute; inset:0; background:linear-gradient(to bottom,transparent 40%,#0D0C0B 100%),linear-gradient(rgba(13,12,11,.18),rgba(13,12,11,.18)); }
body.sjm-home .hero-copy { position:relative; max-width:none; width:100%; margin:0; padding:0 0 24px; text-align:left; }
body.sjm-home .hero-copy h1 { color:#F2EDE4; font-size:43px; line-height:1.35; font-weight:500; letter-spacing:-.05em; text-shadow:0 2px 18px #000; }
body.sjm-home .quick-start { display:block; width:100%; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.home-birth-fields { display:block; }
body.sjm-home .home-birth-fields label { color:#F2EDE4; font-size:12px; }
body.sjm-home .home-birth-fields input { color:#F2EDE4; background:rgba(13,12,11,.7); border-bottom:1px solid #A39B8F; padding:8px 12px; height:52px; font-size:19px; }
body.sjm-home #home-birth-form>.button { color:#0D0C0B; background:#D4AF37; border:0; border-radius:2px; min-height:52px; margin-top:14px; }
body.sjm-home .full-edition-link { display:flex; gap:9px; color:#F2EDE4; padding-top:16px; font-size:13px; }
body.sjm-home .full-edition-link strong { color:#D4AF37; font-size:13px; margin:0; }
body.sjm-home :is(.home-discovery,.home-preview) { padding:34px 24px; }
body.sjm-home .discovery-heading { margin-bottom:12px; }
body.sjm-home .discovery-heading h2 { font-size:16px; color:#A39B8F; font-family:inherit; font-weight:400; }
body.sjm-home .discovery-heading>a { color:#A39B8F; }
body.sjm-home .featured-reading { display:block; padding:26px 0; margin:0; border:0; border-bottom:1px solid rgba(212,175,55,.18); background:transparent; border-radius:0; box-shadow:none; min-height:0; }
body.sjm-home .featured-tag { display:inline; padding:0; background:none; border:0; color:#D4AF37; font-size:12px; }
body.sjm-home .featured-reading h3 { font-size:30px; font-weight:500; margin:7px 0; }
body.sjm-home .featured-action { font-size:14px; color:#D4AF37; margin-top:12px; }
body.sjm-home .poster-shelf { grid-template-columns:1fr; gap:0; }
body.sjm-home .service-poster { display:block; grid-column:auto; grid-row:auto; padding:24px 0; border:0; border-bottom:1px solid rgba(212,175,55,.18); border-radius:0; background:transparent; box-shadow:none; transform:none; }
body.sjm-home .service-poster::before,body.sjm-home .service-poster::after,body.sjm-home .featured-reading::before,body.sjm-home .featured-reading::after { content:none; }
body.sjm-home .service-poster>div { padding:0; }
body.sjm-home .poster-category { font-size:26px; line-height:1.5; color:#F2EDE4; font-weight:500; font-family:"Sijeolmadi Serif","Batang",serif; }
body.sjm-home .service-poster h3 { font-size:14px; color:#A39B8F; font-family:inherit; margin-top:5px; font-weight:400; }
body.sjm-home .service-poster>div>span { display:none; }
body.sjm-home .reading-panel { padding:26px 0 0; border:0; border-radius:0; background:none; box-shadow:none; }
body.sjm-home .reading-clear { color:#F2EDE4; }
body.sjm-home .reading-panel>.button { color:#D4AF37; border:0; border-bottom:1px solid rgba(212,175,55,.18); border-radius:0; padding-inline:0; background:none; }
body.sjm-home .preview-tabs { border-bottom:1px solid rgba(212,175,55,.18); }
body.sjm-home .preview-tabs button { color:#A39B8F; }
body.sjm-home .preview-tabs button[aria-selected="true"] { color:#D4AF37; border-color:#D4AF37; }

/* Narrative text sits on ink, never on the bright part of an illustration. */
.service-intro-overlay { width:min(100%,860px); max-width:860px; background:#0D0C0B; color:#F2EDE4; }
.service-intro-frame { background:#0D0C0B; }
.service-intro-image { mix-blend-mode:normal; }
.service-intro-shade { background:linear-gradient(to bottom,rgba(13,12,11,.12),rgba(13,12,11,.35) 40%,#0D0C0B 100%); }
.service-intro-story-copy { background:rgba(13,12,11,.9); padding:20px 8px; }
.service-intro-skip { color:#F2EDE4; background:rgba(13,12,11,.92); }
.service-intro-header .service-intro-brand { color:#F2EDE4; }
.service-intro-cover-copy { text-shadow:0 2px 12px #000; }
body[data-sjm-page="lifetime"] #v363-premium-story .story-r98-image { object-position:50% 63% !important; }
body[data-sjm-page="lifetime"] #v363-premium-story .story-r98-image { mix-blend-mode:normal; }
body[data-sjm-page="lifetime"] #v363-premium-story .story-next-button { background:#D4AF37 !important; }
body .saju-reading-overview-item { background:#161412 !important; border-color:rgba(212,175,55,.18) !important; }
body :is(#compat-reading-summary,#saju-reading-summary) { margin:22px 0; padding:18px 0; border-block:1px solid rgba(212,175,55,.18); }
body :is(.compat-summary-sentence,.saju-reading-paragraph) { color:#F2EDE4 !important; font-size:15px; line-height:1.9; margin:8px 0; }
body[data-sjm-page="lifetime"] #v363-premium-story .story-r9-copy { background:#0D0C0B !important; }
body[data-sjm-page="lifetime"] .payment-preview-dialog { background:#161412 !important; color:#F2EDE4; }
body[data-sjm-page="lifetime"] .lifetime-lock-footer { background:#161412; }
body[data-sjm-page="lifetime"] .payment-preview-dialog :is(.product-preview-kicker,.preview-sample-tag,.product-badge) { color:#D4AF37 !important; }
body[data-sjm-page="lifetime"] .lifetime-lock-footer .paid-launch-action button:disabled { background:#342E21 !important; color:#D7C9AE !important; -webkit-text-fill-color:#D7C9AE !important; opacity:1 !important; }
body .report-sample-page.open>em { color:#D4AF37 !important; }
body .report-sample-page.locked .report-hidden-question { background:#161412 !important; color:#F2EDE4 !important; }
body :is(#birth-submit-button,#admin-readiness,.launch-primary-button,.product-buy,.cp-cta>a):not(:disabled),
body.sjm-not-found nav a:first-child { background-image:none !important; background-color:#D4AF37 !important; color:#0D0C0B !important; }
body :is(.saju-reading-disclosure,.saju-reading-pillar,.saju-reading-tengod) { background:#161412 !important; }
body .dream-overview-card>div>span { color:#A39B8F !important; }
body[data-sjm-page="lifetime"] #lifetime-roadmap .paid-preview::after,
body[data-sjm-page="lifetime"] #v363-premium-story .story-r9-copy::after { content:none !important; }
body[data-sjm-page="lifetime"] :is(.next-season-preview,.lifetime-next-preview,.story-next-card) { color:#F2EDE4; }

@media (min-width:1024px) {
  body .sjm-header-inner { height:76px !important; min-height:76px !important; width:calc(100% - 48px) !important; }
  body .sjm-desktop-nav { gap:28px; }
  body .sjm-desktop-nav :is(a,button) { font-size:14px; }
  body.sjm-home .home-hero { min-height:660px; padding:170px 48px 70px; justify-content:flex-end; }
  body.sjm-home .hero-image { object-position:50% 54%; }
  body.sjm-home .hero-scene::after { background:linear-gradient(to bottom,transparent 40%,#0D0C0B 100%),linear-gradient(90deg,rgba(13,12,11,.88),transparent 70%); }
  body.sjm-home .hero-copy { max-width:470px; }
  body.sjm-home .hero-copy h1 { font-size:60px; }
  body.sjm-home .quick-start { max-width:390px; }
  body.sjm-home :is(.home-discovery,.home-preview) { padding-inline:48px; }
  body.sjm-home .poster-shelf { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 40px; }
  body :is(.saju-main,.manse-main,.compat-main,.newyear-main,.tarot-main,.dream-main) { padding-inline:40px !important; }
  body:not(.sjm-home) main { padding-inline:24px; }
  body .sjm-related-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; column-gap:32px; }
  body .sjm-service-panel-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  body .sjm-footer-inner { width:calc(100% - 96px) !important; }
  body .payment-preview-dialog { width:min(660px,calc(100vw - 64px)) !important; max-width:660px !important; }
  body[data-sjm-page="lifetime"] #v363-premium-story .story-r9-scene:not([data-v36-exclude]) { grid-template-columns:42% minmax(0,1fr) !important; grid-template-rows:auto !important; align-items:stretch; }
  body[data-sjm-page="lifetime"] #v363-premium-story :is(.story-r9-art,.story-r98-plane,.story-r98-image) { height:100% !important; min-height:360px; }
  body[data-sjm-page="lifetime"] #v363-premium-story .story-r9-copy { padding:28px 24px !important; }
}

/* Wide desktop canvas; smaller viewports retain the existing 860px cap. */
@media (min-width:1200px) {
  html body { max-width:1120px !important; }
  body .sjm-header, body .sjm-bottom-nav { max-width:1120px; }
  .service-intro-overlay { width:min(100%,1120px); max-width:1120px; }
  body main p { max-width:74ch !important; }
  html body .sjm-scroll-top { right:max(24px,calc((100vw - 1120px) / 2 + 16px)); }
}
