/* ======================================================================
   KBIBLE V35 — GLOBAL SANCTUARY LUXURY LAYER
   Visual-only unifier for all public/member pages. No functional layout logic.
   ====================================================================== */
:root{
  --kb35-gold:#d9b86b;
  --kb35-gold-soft:#f0dfa9;
  --kb35-emerald:#0b2c20;
  --kb35-emerald-deep:#04100c;
  --kb35-ink:#020806;
  --kb35-line:rgba(218,185,107,.17);
  --kb35-line-soft:rgba(218,185,107,.09);
  --kb35-glass:rgba(7,25,18,.74);
  --kb35-shadow:0 24px 68px rgba(0,0,0,.26);
  --kb35-shadow-soft:0 15px 42px rgba(0,0,0,.18);
}

html{background:#030907;}
body:not(.admin-body){
  background-color:#04100c;
  background-image:
    radial-gradient(ellipse 60% 34% at 50% 0,rgba(73,142,92,.09),transparent 70%),
    radial-gradient(ellipse 30% 30% at 6% 24%,rgba(218,185,107,.045),transparent 72%),
    radial-gradient(ellipse 34% 32% at 96% 72%,rgba(66,133,94,.055),transparent 72%),
    linear-gradient(180deg,#030a07 0%,#07150f 42%,#030a08 100%);
  background-attachment:fixed;
}
body:not(.admin-body)::selection{background:rgba(215,183,103,.28);color:#fff9e8;}

/* Universal site header: polished dark crystal / gold edge. */
.kb-site-header,
.header.kb-main-site-header,
.suite-header{
  border-bottom-color:rgba(218,185,107,.16)!important;
  background:linear-gradient(180deg,rgba(4,16,12,.94),rgba(3,11,8,.87))!important;
  box-shadow:0 1px 0 rgba(226,194,119,.06),0 15px 44px rgba(0,0,0,.22)!important;
  backdrop-filter:blur(22px) saturate(135%)!important;
  -webkit-backdrop-filter:blur(22px) saturate(135%)!important;
}
.kb-site-header::after,
.header.kb-main-site-header::after,
.suite-header::after{
  content:"";
  position:absolute;
  left:12%;right:12%;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(222,189,111,.35),transparent);
  pointer-events:none;
}
.kb-site-header__logo,
.header.kb-main-site-header .header-logo,
.suite-brand__logo{
  filter:drop-shadow(0 0 12px rgba(218,185,107,.22));
}
.kb-site-header__title,
.header.kb-main-site-header .header-wordmark-top,
.suite-brand__title{letter-spacing:.035em;}

/* Page atmosphere: decorative light that stays behind content. */
:is(.ls-page,.sp-shell,.qt-workspace,.course-main,.memory-app,.prayer-shell,.vocab-main,.ccm-main,.video-main-shell,.mp-shell,.stats-main,.legal-page,.free-shell){
  position:relative;
  z-index:1;
}
:is(.ls-page,.sp-shell,.qt-workspace,.memory-app,.prayer-shell,.vocab-main,.ccm-main,.video-main-shell,.mp-shell,.stats-main)::before{
  content:"";
  position:absolute;
  left:50%;top:-70px;
  width:min(980px,92vw);height:290px;
  transform:translateX(-50%);
  pointer-events:none;
  z-index:-1;
  background:
    linear-gradient(90deg,transparent,rgba(218,185,107,.07),transparent) 50% 34px/72% 1px no-repeat,
    radial-gradient(ellipse 50% 70% at 50% 0,rgba(64,135,88,.095),transparent 72%);
}

/* Premium hero family. */
:is(.ls-hero,.prayer-hero,.memory-hero,.course-hero,.suite-hero,.ccm-hero,.video-hero,.mp-hero,.stats-hero){
  position:relative;
  overflow:hidden;
  border:1px solid rgba(218,185,107,.13)!important;
  border-radius:30px!important;
  background:
    radial-gradient(circle at 86% 10%,rgba(218,185,107,.085),transparent 26%),
    radial-gradient(circle at 14% 8%,rgba(72,149,101,.10),transparent 31%),
    linear-gradient(145deg,rgba(11,38,28,.83),rgba(4,17,12,.91))!important;
  box-shadow:0 28px 78px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04)!important;
}
:is(.ls-hero,.prayer-hero,.memory-hero,.course-hero,.suite-hero,.ccm-hero,.video-hero,.mp-hero,.stats-hero)::after{
  content:"";
  position:absolute;
  left:7%;right:7%;top:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(235,208,143,.50),transparent);
  pointer-events:none;
}
:is(.ls-eyebrow,.prayer-kicker,.memory-kicker,.course-kicker,.suite-hero__eyebrow,.ccm-kicker,.video-kicker,.mp-eyebrow){
  color:#d8b96e!important;
  letter-spacing:.14em!important;
  text-shadow:0 0 16px rgba(218,185,107,.11);
}

/* Card families: depth, gold edge, quiet emerald glass. */
:is(
  .ls-card,.ls-picker-card,.ls-voice-card,
  .sp-studio-card,.sp-target-panel,.sp-recorder-panel,.sp-result-overview,
  .qt-editor-card,.qt-help-summary,
  .prayer-compose,.prayer-check-card,.prayer-fieldset,
  .course-panel,.course-history-card,
  .practice-card,.scripture-sheet,.today-summary,.review-dashboard-grid > *,
  .suite-panel,.suite-item,.suite-metric,.vocab-lookup-card,.vocab-entry-form,.vocab-library-tools,
  .ccm-library-panel,.ccm-curation,.ccm-lyrics-panel,.ccm-focus-card,
  .video-control-card,.video-library-panel,.video-card,.video-flow-card,
  .mp-section,.mp-password-panel,.mp-guest,
  .stats-focus-card,.stats-module,.stats-highlight-card,.stats-quick-card,
  .legal-page section,.free-card
){
  border-color:rgba(218,185,107,.12)!important;
  box-shadow:var(--kb35-shadow-soft),inset 0 1px 0 rgba(255,255,255,.035)!important;
}

:is(.ls-card,.sp-studio-card,.qt-editor-card,.prayer-compose,.course-panel,.practice-card,.suite-panel,.vocab-lookup-card,.ccm-library-panel,.video-library-panel,.mp-section,.stats-focus-card){
  background-image:
    linear-gradient(145deg,rgba(255,255,255,.018),transparent 28%),
    radial-gradient(circle at 92% 0,rgba(218,185,107,.045),transparent 28%)!important;
}

/* Interactive controls: same premium language while preserving page colors. */
body:not(.admin-body) :is(button,a,input,textarea,select){
  -webkit-tap-highlight-color:transparent;
}
body:not(.admin-body) :is(input,textarea,select):focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(218,185,107,.09),0 8px 24px rgba(0,0,0,.10)!important;
}
body:not(.admin-body) :is(input,textarea,select){
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
body:not(.admin-body) :is(button,a[class*="btn"],a[class*="button"]){
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background-color .18s ease,color .18s ease;
}
@media (hover:hover){
  body:not(.admin-body) :is(button,a[class*="btn"],a[class*="button"]):not(:disabled):hover{transform:translateY(-1px);}
}

/* Serif display typography only for major page titles. */
:is(.ls-hero h1,.prayer-hero h1,.memory-hero h1,.course-hero h1,.suite-hero__title,.ccm-hero h1,.video-hero h1,.mp-hero h1,.stats-hero h1,.legal-page>h1,.free-hero h1){
  font-family:"Noto Serif KR","Nanum Myeongjo",Batang,Georgia,serif!important;
  letter-spacing:-.045em!important;
  color:color-mix(in srgb,currentColor 88%,#f0dca2 12%);
}

/* Reader retains its independent paper selection; premium only around it. */
.kb-bible-v5{
  background:
    radial-gradient(ellipse 64% 32% at 50% 0,rgba(66,139,91,.08),transparent 70%),
    linear-gradient(180deg,#030a07,#07150f 45%,#030a08)!important;
}
.kb-bible-v5 :is(.reader-shell,.reader-main,.bible-shell,.reader-panel,.bible-sidebar){
  border-color:rgba(218,185,107,.11)!important;
}
.kb-bible-v5 :is(.reader-shell,.bible-shell){box-shadow:0 28px 80px rgba(0,0,0,.22);}

/* Auth / legal / membership pages. */
body.kb-has-site-header :is(.login-card,.register-card,.reset-card,.free-hero,.legal-page){
  border-color:rgba(218,185,107,.15)!important;
  box-shadow:0 28px 85px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.04)!important;
}
.free-hero{
  background:
    radial-gradient(circle at 88% 8%,rgba(218,185,107,.12),transparent 31%),
    linear-gradient(145deg,rgba(10,36,26,.91),rgba(4,15,11,.95))!important;
}
.free-card{background:linear-gradient(145deg,rgba(12,37,28,.80),rgba(5,17,13,.88))!important;}

/* Toasts/notices stay readable above Shalom and the premium background. */
:is(.mp-toast,.memory-toast,.kb-toast,[class*="toast"]){
  backdrop-filter:blur(20px) saturate(140%);
  -webkit-backdrop-filter:blur(20px) saturate(140%);
  box-shadow:0 18px 50px rgba(0,0,0,.32),0 0 0 1px rgba(218,185,107,.10)!important;
}

/* Elegant scrollbars without reducing usable width. */
@media (pointer:fine){
  body:not(.admin-body) *{scrollbar-width:thin;scrollbar-color:rgba(218,185,107,.33) rgba(255,255,255,.025);}
  body:not(.admin-body) *::-webkit-scrollbar{width:8px;height:8px}
  body:not(.admin-body) *::-webkit-scrollbar-track{background:rgba(255,255,255,.018)}
  body:not(.admin-body) *::-webkit-scrollbar-thumb{background:linear-gradient(#806d3f,#c4a55d);border-radius:99px;border:2px solid rgba(3,10,7,.88)}
}

/* Light variants: keep depth and gold edge, never force dark text/background rules. */
:is(
 body[data-listening-theme="light"],body[data-speaking-theme="light"],body[data-qt-theme="light"],
 body[data-kb-page-theme="light"],body[data-ui-theme="light"]
){
  background-color:#f6f2e8!important;
  background-image:radial-gradient(ellipse 65% 34% at 50% 0,rgba(87,143,108,.08),transparent 70%),linear-gradient(180deg,#fbfaf5,#f2eee4 48%,#faf8f2)!important;
}
:is(
 body[data-listening-theme="light"],body[data-speaking-theme="light"],body[data-qt-theme="light"],
 body[data-kb-page-theme="light"],body[data-ui-theme="light"]
) :is(.ls-hero,.prayer-hero,.memory-hero,.course-hero,.suite-hero,.ccm-hero,.video-hero,.mp-hero,.stats-hero){
  background:linear-gradient(145deg,rgba(255,255,255,.93),rgba(246,242,232,.96))!important;
  border-color:rgba(113,88,37,.14)!important;
  box-shadow:0 22px 60px rgba(82,69,42,.08),inset 0 1px 0 #fff!important;
}

@media (max-width:860px){
  :is(.ls-hero,.prayer-hero,.memory-hero,.course-hero,.suite-hero,.ccm-hero,.video-hero,.mp-hero,.stats-hero){border-radius:24px!important;}
  :is(.ls-page,.prayer-shell,.memory-app,.vocab-main,.ccm-main,.video-main-shell,.mp-shell,.stats-main)::before{top:-32px;height:200px;}
}
@media (max-width:520px){
  :is(.ls-hero,.prayer-hero,.memory-hero,.course-hero,.suite-hero,.ccm-hero,.video-hero,.mp-hero,.stats-hero){border-radius:20px!important;}
}
@media (prefers-reduced-motion:reduce){
  body:not(.admin-body) *,body:not(.admin-body) *::before,body:not(.admin-body) *::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;}
}
