/*! Nadertricks Studio - responsive layer v5.3 (Dec 2026) | (c) 2026 Nader Tricks. All rights reserved. */
:root{--nts-st:env(safe-area-inset-top,0px);--nts-sb:env(safe-area-inset-bottom,0px);--nts-sl:env(safe-area-inset-left,0px);--nts-sr:env(safe-area-inset-right,0px)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
a,button,summary,input,select,textarea,[role=button]{touch-action:manipulation}

/* the app page used to lock the document: the guide below it could not be reached */
html,body{overflow-x:hidden!important;overflow-y:auto!important}
body{-webkit-overflow-scrolling:touch}

/* content pages: language homes and tool pages */
header{padding-left:max(20px,var(--nts-sl));padding-right:max(20px,var(--nts-sr))}
header a{min-height:44px;display:inline-flex;align-items:center;gap:10px}
main{padding-left:max(18px,var(--nts-sl));padding-right:max(18px,var(--nts-sr));overflow-wrap:break-word}
main img,.wbox img{max-width:100%;height:auto}
main h1{font-size:clamp(26px,6.9vw,34px)}
main h2{font-size:clamp(20px,5.2vw,26px)}
main h3{font-size:clamp(17px,4.2vw,20px)}
main p,main li{overflow-wrap:break-word}
.cta{min-height:48px;display:inline-flex;align-items:center;justify-content:center;padding:12px 22px}
details{margin:10px 0}
summary{min-height:44px;display:flex;align-items:center}
.langs a,.rel a,#langnav#langnav a{min-height:44px;display:inline-flex;align-items:center;padding-inline:2px}
footer{padding-bottom:var(--nts-sb)}

/* tables scroll inside their own box instead of stretching the page */
.tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%;margin:14px 0;overscroll-behavior-x:contain}
.tbl>table{margin:0;max-width:none}
.tbl-w>table{min-width:520px}

/* app shell */
body #app#app{height:100vh;height:100svh;grid-template-rows:auto minmax(0,1fr) auto;direction:ltr}
body #top#top{min-height:46px;padding-top:var(--nts-st);padding-left:calc(10px + var(--nts-sl));padding-right:calc(10px + var(--nts-sr))}
body #status#status{min-height:24px;padding-bottom:var(--nts-sb);padding-left:calc(12px + var(--nts-sl));padding-right:calc(12px + var(--nts-sr))}
body #welcome#welcome,body #modal#modal,body #drop#drop,body #tour#tour,body #box#box,body #hsheet#hsheet,body #pal#pal,body #adjpop#adjpop,body #baov#baov{direction:ltr}
body #guide#guide{padding-left:max(22px,var(--nts-sl));padding-right:max(22px,var(--nts-sr))}
body #guide#guide h1{font-size:clamp(26px,6.6vw,34px);line-height:1.3}
body #guide#guide h2{font-size:clamp(20px,5vw,24px)}
body #guide#guide summary{min-height:44px;display:flex;align-items:center}
body #guide#guide footer{padding-bottom:calc(18px + var(--nts-sb))}
body #togSide#togSide{bottom:calc(62px + var(--nts-sb))}
body #adjpop#adjpop{bottom:calc(46px + var(--nts-sb))}
body .nts-toast,body #obbar#obbar{bottom:calc(70px + var(--nts-sb))}
body #tour#tour .tc{bottom:calc(24px + var(--nts-sb))}
body #nts-ot#nts-ot{min-width:44px;min-height:40px}

@media(max-width:760px){
  body #top#top{min-height:50px}
  body #app#app{position:relative}
  body #opts#opts{position:absolute!important}
  body #top#top .btn{min-height:40px}
  body #ham#ham{min-width:44px;min-height:44px}
  body #guideLink#guideLink{display:inline-flex!important;align-items:center;justify-content:center;width:44px;min-width:44px;height:40px;padding:0!important;font-size:0!important;line-height:0;color:var(--tx);text-decoration:none}
  body #guideLink#guideLink::after{content:'\2193';font-size:18px;line-height:1}
  body #opts#opts{font-size:14px}
  body #opts#opts label{font-size:13px}
  body #opts#opts .tb{min-width:38px;min-height:38px}
  body .tabs button{font-size:13px;min-height:42px;padding:8px 12px}
  body .hi{font-size:13px;min-height:40px;display:flex;align-items:center}
  body .opl{font-size:13px}
  body #status#status{font-size:13px;gap:12px}
  body .layer{min-height:44px}
  body #side#side{bottom:calc(112px + var(--nts-sb));height:50dvh}
  body #tools#tools{padding-bottom:2px}
  body #tools#tools .tool{width:44px;height:44px}

  body #welcome#welcome#welcome#welcome{padding:0}
  body #welcome#welcome#welcome#welcome .wbox{display:flex;flex-direction:column;max-height:100dvh;min-width:0;max-width:100%;padding-bottom:var(--nts-sb)}
  body #welcome#welcome .wbox>*{order:5;min-width:0}
  body #welcome#welcome .wbox{position:relative}
  body #welcome#welcome .wbox #wlang#wlang{max-width:calc(100% - 20px)}
  body #welcome#welcome .wbox .mw-hero{order:1;padding:24px 18px 20px;margin-bottom:14px}
  body #welcome#welcome .wbox .wcards{order:2;padding:0 16px;margin:0 0 6px}
  body #welcome#welcome .wbox .ai-row{order:3}
  body #welcome#welcome .wbox #wimp#wimp{order:4}
  body #welcome#welcome#welcome#welcome .mw-hero img{width:58px;height:58px;border-radius:16px}
  body #welcome#welcome#welcome#welcome .mw-hero h2{font-size:22px;margin:8px 0 4px}
  body #welcome#welcome#welcome#welcome .mw-hero p{font-size:14px;line-height:1.5}
  body #welcome#welcome#welcome#welcome .wfoot{gap:8px}
  body #welcome#welcome#welcome#welcome .wfoot .btn,body #welcome#welcome#welcome#welcome #wrest#wrest{min-height:44px}

  body #guide#guide{padding-top:34px;padding-bottom:calc(56px + var(--nts-sb));font-size:16px;line-height:1.9}
  body #guide#guide h1{font-size:clamp(23px,6.6vw,30px)}
  body #guide#guide h2{margin-top:32px}
  body #guide#guide details{padding:12px 14px}
  body #guide#guide table{font-size:15px}
}

@media(max-width:560px){
  body #top#top{min-height:52px;gap:3px}
  body #top#top .btn{min-height:44px;padding:6px 8px}
  body #top#top #lang#lang{display:none!important}
  body #top#top #ulang#ulang{max-width:92px}
  body #welcome#welcome .wcards{gap:8px;padding:0 12px}
  body #welcome#welcome#welcome#welcome .wc{min-height:104px}
  body #welcome#welcome#welcome#welcome .mw-hero{padding:20px 14px 16px}
  body #welcome#welcome#welcome#welcome .mw-hero h2{font-size:20px}
  main{padding-left:max(16px,var(--nts-sl));padding-right:max(16px,var(--nts-sr))}
  header{padding-left:max(16px,var(--nts-sl));padding-right:max(16px,var(--nts-sr))}
  main h1{font-size:clamp(24px,7.4vw,30px)}
  body #guide#guide{padding-left:max(16px,var(--nts-sl));padding-right:max(16px,var(--nts-sr))}
}

@media(max-height:480px) and (max-width:900px){
  body #side#side{height:62dvh}
  body #welcome#welcome#welcome#welcome .mw-hero{padding:14px 16px 12px}
  body #welcome#welcome#welcome#welcome .mw-hero img{width:44px;height:44px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  body #side#side{transition:none!important}
}
