/* PinDoDo v61 — professional finishing layer
   Focus: accessible interaction, resilient mobile layouts, forms, tables and overlays. */
:root{
  --pdd-content-max:1280px;
  --pdd-control-height:48px;
  --pdd-focus-ring:0 0 0 3px rgba(124,58,237,.22);
  --pdd-border:rgba(35,28,48,.10);
}
html{scroll-padding-top:88px;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{min-width:320px}
img,video,canvas,svg{max-width:100%}
img{height:auto}
button,input,select,textarea{font:inherit}
button,[role="button"],a{ -webkit-tap-highlight-color:transparent }
:where(button,[role="button"],a,input,select,textarea):focus-visible{
  outline:3px solid rgba(124,58,237,.62)!important;
  outline-offset:3px!important;
}
:where(input,select,textarea){min-height:var(--pdd-control-height)}
:where(button,[role="button"]){min-height:42px}
:where(a,button){overflow-wrap:anywhere}
:where(.pdd-product-card,.pdd-cat-card,.feat,.step,.admin-card,.stat-card,.dashboard-card,.settings-card){min-width:0}
:where(.pdd-product-card,.feat,.step,.admin-card,.stat-card,.dashboard-card,.settings-card){transition:box-shadow .2s ease,border-color .2s ease,transform .2s ease}
:where(.pdd-product-card,.feat,.step,.admin-card,.stat-card,.dashboard-card,.settings-card):focus-within{
  box-shadow:0 0 0 2px rgba(124,58,237,.15),0 10px 28px rgba(24,18,38,.07)
}
:where(.pdd-modal,.pdd-sheet,.modal,.sheet,[role="dialog"]){overscroll-behavior:contain}
:where(table){border-collapse:separate;border-spacing:0;max-width:100%}
:where(.table-wrap,.table-responsive){max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
:where(input,textarea)::placeholder{opacity:.72}
:where(.pdd-toast,[role="status"],[role="alert"]){overflow-wrap:anywhere}
:where(.pdd-product-card,.pdd-cat-card) img{display:block}
:where(.pdd-product-card) img[loading="lazy"]{content-visibility:auto}
:where(.pdd-bottom-nav){padding-bottom:env(safe-area-inset-bottom,0px)}
:where(.pdd-modal,.pdd-sheet){padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}
:where(.pdd-home,.pdd-catalog,.pdd-product-page,#root){max-width:100%;min-width:0}
@media(hover:hover) and (pointer:fine){
  :where(.pdd-product-card,.pdd-cat-card,.admin-card,.stat-card,.dashboard-card):hover{
    transform:translateY(-2px)
  }
}
@media(max-width:760px){
  :where(.admin-main,.main,.content,.pdd-home,.pdd-catalog){min-width:0;max-width:100%}
  :where(.admin-table,.table-wrap,.table-responsive){overflow-x:auto}
  :where(.pdd-product-card button,.pdd-cat-card button){min-height:44px}
  :where(.pdd-modal,.pdd-sheet,.modal,.sheet){max-height:calc(100dvh - 16px);overflow:auto}
  :where(.pdd-bottom-nav){padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
}
@media(max-width:380px){
  :where(.pdd-catalog-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  :where(.pdd-product-card .pdd-media){border-radius:14px!important}
  :where(.pdd-product-card .pdd-name,.pdd-product-card .pdd-title){font-size:12px!important}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media(prefers-contrast:more){
  :root{--pdd-border:rgba(20,15,30,.28)}
  :where(button,a,input,select,textarea,.pdd-product-card,.pdd-cat-card){border-color:currentColor}
}
@media(forced-colors:active){
  :where(button,a,input,select,textarea){forced-color-adjust:auto}
  :where(button,a):focus-visible{outline:2px solid Highlight!important}
}
html[data-theme="dark"]{
  --pdd-border:rgba(235,230,248,.16);
  --pdd-focus-ring:0 0 0 3px rgba(190,160,255,.28);
}
html[data-theme="dark"] :where(input,select,textarea){color-scheme:dark}
html[data-theme="dark"] :where(.pdd-product-card,.pdd-cat-card,.admin-card,.stat-card,.dashboard-card,.settings-card,.table-wrap){
  border-color:var(--pdd-border)
}
html[data-theme="dark"] :where(.pdd-toast,[role="status"],[role="alert"]){color:var(--ink,#f6f7fb)}
