/* KB_TOPTOOLS3: shared phone-first touches for the leading tool pages */
.tt3-toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:#111827;color:#fff;padding:10px 16px;border-radius:12px;font-size:.9rem;max-width:min(92vw,420px);text-align:center;opacity:0;pointer-events:none;transition:.2s;z-index:9999;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.tt3-toast.on{opacity:1;transform:translate(-50%,0)}
.tt3-veil{position:fixed;inset:10px;border:3px dashed #4f46e5;border-radius:18px;background:rgba(238,242,255,.88);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.15rem;color:#3730a3;z-index:9998;opacity:0;pointer-events:none;transition:opacity .12s;text-align:center;padding:20px}
.tt3-veil.on{opacity:1}
.tt3-paste{margin:6px 6px 6px 0}
.tt3-zoom{position:fixed;inset:0;background:rgba(15,23,42,.9);z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.tt3-zoom img{max-width:100%;max-height:100%;background:#fff;border-radius:4px;box-shadow:0 20px 50px rgba(0,0,0,.5)}
.tt3-zx{position:fixed;top:calc(12px + env(safe-area-inset-top));right:12px;width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:#111;font-size:1.2rem;font-weight:800;cursor:pointer}
.tt3-pill{position:fixed;right:14px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:60;border:0;border-radius:999px;background:#4f46e5;color:#fff;font-weight:800;padding:12px 18px;font-size:.92rem;box-shadow:0 10px 24px rgba(79,70,229,.4);cursor:pointer}
.tt3-pill[hidden]{display:none}
/* speech to text: the file button comes right after the language, settings after */
#btapp[data-mode=stt] #bt-root{display:flex;flex-direction:column}
#btapp[data-mode=stt] #bt-root>.bt-row:first-child{order:-6}
#btapp[data-mode=stt] #bt-root>.bt-drop{order:-5}
#btapp[data-mode=stt] #bt-root>.bt-bar{order:-4}
#btapp[data-mode=stt] #bt-root>.bt-prog{order:-3}
#btapp[data-mode=stt] #bt-root>div:not([class]){order:-2}
#btapp[data-mode=stt] #bt-root>.bt-drop{min-height:150px}
@media (max-width:760px){
  /* text to speech: Play / Pause / Stop stays reachable while typing long text */
  #btapp[data-mode=tts] .bt-actions{position:sticky;bottom:0;z-index:6;background:#fff;margin:0 -12px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -8px 18px rgba(15,23,42,.08)}
  #btapp[data-mode=tts] .bt-actions .btn-primary{flex:1;min-height:48px;font-weight:800}
  /* container calculator: the main button follows you down the goods list */
  #cargoapp #cg-go{position:sticky;bottom:calc(10px + env(safe-area-inset-bottom));z-index:7;box-shadow:0 10px 24px rgba(79,70,229,.35)}
  /* stamp + print makers: live preview first, compact and sticky; download button sticks to the bottom */
  #stapp .app-split,#makerapp .app-split{display:flex;flex-direction:column}
  #stapp .prev-box,#makerapp .prev-box{order:-1;position:sticky;top:0;z-index:5;padding:8px;margin:0 0 6px;box-shadow:0 6px 14px rgba(15,23,42,.08)}
  #stapp .prev-box canvas{max-width:180px!important}
  #makerapp .prev-box img{max-height:30vh;width:auto}
  #makerapp .prev-box p{margin:4px 0 0}
  #stapp .btn-row,#makerapp .btn-row{position:sticky;bottom:0;z-index:6;background:#fff;padding:10px 0 calc(10px + env(safe-area-inset-bottom));margin:8px 0 0;box-shadow:0 -8px 18px rgba(15,23,42,.06)}
  #stapp .btn-row .btn-go,#makerapp .btn-row .btn-go{flex:1;min-height:48px}
}
/* stamp extras */
.st3-pre{margin:2px 0 12px}
.st3-pre .chip{min-height:34px}
.st3-hint{margin:-4px 0 10px}
/* quiz / worksheet makers: build first, play later; Download follows you on phones */
body[data-tool=quiz-maker] #edu-root{display:flex;flex-direction:column}
body[data-tool=quiz-maker] #edu-root>.es-panel{order:10;margin-top:18px}
@media (max-width:760px){
  #edu-root>.btn-row:has(.btn-go){position:sticky;bottom:0;z-index:6;background:#fff;padding:10px 0 calc(10px + env(safe-area-inset-bottom));box-shadow:0 -8px 18px rgba(15,23,42,.06)}
  #edu-root>.btn-row:has(.btn-go) .btn-go{flex:1;min-height:48px}
  .eduapp .es-top .btn-row .btn{padding:6px 10px;font-size:.82rem}
}
/* resume: quick download from the preview bar */
.tt3-cvdl{margin-inline-start:6px}
.pl-meta .tt3-paste{margin:0;min-height:28px;min-width:34px;padding:0 6px;font-size:0;line-height:1;flex:0 0 auto}.pl-meta .tt3-paste::first-letter{font-size:1rem}
.pl-meta .tt3-paste{display:none!important}
.tt3-cam{display:flex;justify-content:center;width:100%;min-height:48px;margin:8px 0;font-weight:700}
