/* KBIBLE V48 final polish — conservative site-wide finishing layer. */
:root{--kb48-focus:color-mix(in srgb,var(--accent,#d7b563) 72%,#fff 28%);--kb48-panel-shadow:0 18px 52px rgba(0,0,0,.18)}
html{scroll-behavior:smooth;text-size-adjust:100%;-webkit-text-size-adjust:100%;}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;}
::selection{background:color-mix(in srgb,var(--accent,#d7b563) 32%,transparent);color:inherit}
:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--kb48-focus)!important;outline-offset:3px!important;box-shadow:0 0 0 5px color-mix(in srgb,var(--kb48-focus) 18%,transparent)!important;}
:where(button,.btn,[role="button"]){touch-action:manipulation;}
:where(input,select,textarea){caret-color:var(--accent,#d7b563);}
:where(img,video,canvas,svg){max-width:100%;}
:where(.card,.panel,.surface,.kb-card,.studio-card){backface-visibility:hidden;}
@media (min-width:901px){:where(.card,.panel,.surface,.kb-card,.studio-card):not(.no-premium-shadow){box-shadow:var(--kb48-panel-shadow);}}
@media (max-width:900px){
  html,body{max-width:100%;overflow-x:clip;}
  body{min-width:0;}
  :where(main,section,article,aside,header,footer,nav,form,fieldset,div){min-width:0;}
  :where(input,select,textarea,button){font-size:max(16px,1em);}
  :where(button,.btn,[role="button"]){min-height:42px;}
  :where(pre,code,.code,td,th){overflow-wrap:anywhere;word-break:break-word;}
}
@media (max-width:520px){
  :where(.modal,.dialog,[role="dialog"]){max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;}
  :where(.page-shell,.container,.wrap,.content-shell){max-width:100%;}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}:where(*,*::before,*::after){scroll-behavior:auto!important;}}
