/* PokéFlip Studio Mobile Lab — scanner-first experience */
.mobile-dock,.mobile-drawer,.mobile-scrim{display:none}
@media(max-width:760px){
 body{--dock-height:72px;padding-bottom:calc(var(--dock-height) + env(safe-area-inset-bottom,0px))}
 .wrap{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
 .tabs{display:none!important}
 .wrap{padding-top:14px}
 .top{padding:11px 14px}
 .brand{font-size:19px}
 #backupTop{display:none}
 .mobile-dock{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  position:fixed;z-index:30;
  bottom:0;left:0;right:0;
  min-height:var(--dock-height);
  padding:7px 7px calc(6px + env(safe-area-inset-bottom,0px));
  background:#0f192cfa;
  border-top:1px solid #58627b;
  box-shadow:0 -12px 35px #060c1ad9;
  gap:3px;
 }
 .dock-item{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;border:0;border-radius:13px;background:none;color:#a7b6cf;
  font-size:12px;font-weight:800;letter-spacing:.2px;
  min-width:0;min-height:55px;
 }
 .dock-symbol{font-size:25px;font-weight:400;line-height:1}
 .dock-item.on:not(.dock-scan){background:#2e3048;color:#ffe1a2}
 .dock-scan{color:#fff1c6;background:linear-gradient(150deg,#bc3349,#8e2b51);border:1px solid #e56a6b}
 .dock-scan .dock-symbol{font-weight:900;font-size:29px;line-height:.9}
 .dock-scan.on{background:linear-gradient(135deg,#f4c65d,#d94f59);color:#141c2d}
 .mobile-scrim:not([hidden]){display:block;position:fixed;inset:0;z-index:34;background:#020815b5;backdrop-filter:blur(3px)}
 .mobile-drawer{
  display:block;position:fixed;z-index:35;left:0;right:0;bottom:0;
  max-height:min(76dvh,630px);overflow-y:auto;
  padding:20px 18px calc(28px + env(safe-area-inset-bottom,0px));
  background:linear-gradient(150deg,#1e2d48,#10182b);
  border-radius:24px 24px 0 0;border:1px solid #55617b;
  box-shadow:0 -15px 80px #01050ddd;
  transform:translateY(106%);visibility:hidden;
  transition:transform .23s ease,visibility .23s;
 }
 body.mobile-menu-open .mobile-drawer{transform:translateY(0);visibility:visible}
 .mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
 .mobile-drawer-head strong{font-size:19px;letter-spacing:-.5px}
 #mobileDrawerLinks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .drawer-link{
  background:#233450;color:#e9edf8;border:1px solid #435774;
  border-radius:12px;text-align:left;padding:15px 12px;font-weight:750;font-size:13px;
 }
 .drawer-link.on{color:#ffe3a4;border-color:#d6a965;background:#403442}
 section>h1{font-size:28px;padding:22px 16px 5px}
 section>h1:before{font-size:12px;letter-spacing:1.6px}
 section>.muted:first-of-type{font-size:12px;line-height:1.5}
 .panel{border-radius:14px}
}
@media(max-width:390px){
 .dock-item{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
 .mobile-drawer{transition:none}
}

/* Rapid continuous scanning, balanced for camera use in bulk sorting. */
.live-controls{
 display:flex;flex-direction:column;gap:9px;margin-bottom:14px;
 padding:15px;border:1px solid #a47b53;border-radius:13px;
 background:linear-gradient(130deg,#40303b,#1b3146);
}
.live-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}
.live-heading strong{font-size:17px;color:#ffe4a9}
.live-description,.live-disclaimer{font-size:12px;line-height:1.45;margin:0;color:#d4ddee}
.live-actions{display:flex;gap:8px}
.live-actions button{min-height:48px;flex:1;font-size:14px}
.live-actions button[hidden]{display:none}
.live-progress{display:flex;gap:10px;justify-content:space-between;font-size:12px;color:#e5cf9e;font-weight:800}
.live-progress>*{min-width:0}
#liveCamera{display:none}
@media(max-width:760px){
 .live-controls{border-radius:13px;padding:12px;margin:-2px 0 12px}
 .live-heading strong{font-size:16px}
 .live-actions .btn.primary{background:linear-gradient(120deg,#f9d975,#e4aa43);color:#1b1e2a}
}

.live-options{display:flex;gap:12px;align-items:center;flex-wrap:wrap;color:#e0d4b6;font-size:12px}
.live-options label{display:flex;align-items:center;gap:6px}
.live-options input[type=number]{width:66px;padding:6px 8px;font-size:12px}
.live-options input[type=checkbox]{width:17px;height:17px}
.live-options small{color:#adbbce}

/* Polish audit: 44px minimum touch targets on phones (WCAG 2.5.5 / Material guidance). */
@media (pointer:coarse),(max-width:760px){
 html .btn,html .smallbtn,html select,html textarea,html input:not([type=checkbox]):not([type=radio]):not([type=hidden]){min-height:44px}
 html .smallbtn{padding-block:10px}
 .source-row input[type=checkbox]{width:24px;height:24px}
}

/* Phone keyboard open (mobile-experience.js): nothing floats over the field being typed in. */
body.kb-open .mobile-dock,body.kb-open .add-card-fab,body.kb-open .to-top{display:none!important}
input,textarea,select{scroll-margin-block:96px 80px}
@media(max-width:760px){
 body.kb-open{padding-bottom:0}
 #toast{bottom:calc(var(--dock-height,72px) + 14px + env(safe-area-inset-bottom,0px))!important;z-index:40!important;width:max-content;text-align:center}
}

/* Help & FAQ, first-run walkthrough, privacy policy and problem report. */
.faq summary{cursor:pointer;font-weight:750;font-size:15px;min-height:28px}
.faq[open] summary{margin-bottom:8px}
.doc-dialog h1{font-size:21px}
.doc-dialog h2{font-size:16px;margin-top:22px;scroll-margin-top:72px}
.doc-dialog .box{background:#151f34;border:1px solid #33415c;border-radius:10px;padding:2px 14px}
.doc-bar{position:sticky;top:-24px;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:10px;background:#121d30;padding:10px 0;border-bottom:1px solid #29384e}
.doc-toc summary{cursor:pointer;padding:12px 0;font-weight:700}
.doc-toc div{display:flex;flex-direction:column;gap:6px}
.doc-toc button{text-align:left}
.doc-body{overflow-wrap:anywhere}
.report-dialog select,.report-dialog textarea{margin-bottom:10px}
.report-details{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.5 inherit;margin:8px 0}
.tour-dialog{text-align:center}
.tour-icon{font-size:46px;line-height:1.1;margin-bottom:8px}
dialog.tour-dialog h2:focus,dialog.tour-dialog h2:focus-visible{outline:none!important}
.tour-dots{display:flex;justify-content:center;gap:8px;margin:16px 0 0}
.tour-dots i{width:8px;height:8px;border-radius:50%;background:#3a4b66}
.tour-dots i.on{background:#58d7b0}
@media(max-width:560px){.doc-bar{top:-15px}}
