/* ---- Kepla tools on a phone ----
   The same language as the transfer app: one dark ground, rounded cards,
   lime for the one thing to do next, segmented controls, 16px fields (so
   iOS never zooms), sentence-case labels. Loaded after each tool's own CSS,
   phones only. */
@media (max-width:767px){
  /* ground */
  html.kembed, html.kembed body{background:#0E0E10 !important;}
  html.kembed .ws-k{display:none !important;}
  html.kembed .ws-head{padding-top:4px !important;}
  .ws-h1, h1.ws-h1{font-size:26px !important; line-height:1.15 !important; letter-spacing:-.7px !important;}
  html.kembed .kapp-lede, html.kembed .kapp-proof, html.kembed .ws-sub, html.kembed .lede{display:none !important;}

  /* fields: 16px so a tap never zooms the page, filled, rounded */
  input[type=text], input[type=email], input[type=number], input[type=search], input[type=url], input:not([type]), select, textarea, .num, .txt2, .sel{font-size:16px !important;}
  .calc-in input.num, .calc-in input.txt2, .calc-in select, .calc-in textarea, .ws select.sel, .ws input.sel{height:48px !important; padding:0 14px !important; border:0 !important; border-radius:12px !important; background-color:#2A2A2E !important; box-shadow:none !important; color:#fff !important;}
  .calc-in textarea{height:auto !important; padding:12px 14px !important;}
  .calc-in select, .ws select.sel{-webkit-appearance:none; appearance:none; padding-right:36px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-opacity='.45' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right 14px center !important; background-size:12px 8px !important;}
  input[type=checkbox]{accent-color:#DFFF3F; width:20px !important; height:20px !important;}
  input[type=range]{accent-color:#DFFF3F;}

  /* buttons: lime for the action, filled grey for the rest, all rounded */
  .ws .btn-w, .btn-w, .calc .copybtn.gen, .calc-in .gen, #convertAll{border-radius:12px !important; background:#DFFF3F !important; color:#17171A !important; border:0 !important; box-shadow:none !important; font-weight:600 !important;}
  .ws .btn-w:hover, .btn-w:hover{background:#E8FF66 !important;}
  .ws .btn-o, .btn-o, .calc-out .copybtn{border-radius:12px !important; background:#2A2A2E !important; color:#fff !important; border:0 !important; box-shadow:none !important;}
  .ws .btn-g, .btn-g{border-radius:10px !important; color:rgba(235,235,245,.7) !important;}
  .ws .drop .row .btn-w, .ws .drop .row .btn-o{height:50px !important; font-size:16px !important;}
  #convertAll, .btn-w.big{height:52px !important; font-size:16px !important;}

  /* the drop area: a card, not a dashed box */
  .ws .drop input, .ws .drop .ico{outline:0;}
  .ws .drop, .drop{border:0 !important; border-radius:16px !important; background:#1C1C1F !important; box-shadow:none !important;}
  .ws .drop .ico, .drop .ico{border:0 !important; border-radius:12px !important; background:#2E2E33 !important;}
  .ws .drop .big{font-size:19px !important; letter-spacing:-.3px !important;}
  .ws .drop .sub{font-size:14px !important; color:rgba(235,235,245,.55) !important;}

  /* labels: quiet, sentence case */
  .fl, .kapp-opt .fl, .calc-out .calc-h, .tnext-k, .ws label.fl{text-transform:none !important; letter-spacing:0 !important; font-size:13px !important; font-weight:400 !important; color:rgba(235,235,245,.55) !important;}
  .tnext-k{text-transform:lowercase !important;}
  .tnext-k::first-letter{text-transform:uppercase;}
  .calc-in .field > label{font-size:14px !important; color:rgba(235,235,245,.75) !important;}
  .hint{font-size:12.5px !important; color:rgba(235,235,245,.45) !important;}

  /* segmented controls, the iOS kind */
  .seg{display:flex !important; flex-wrap:wrap; gap:2px !important; padding:2px !important; border:0 !important; border-radius:10px !important; background:rgba(118,118,128,.24) !important; box-shadow:none !important;}
  .seg button{flex:1 1 auto; min-height:36px !important; height:auto !important; padding:6px 10px !important; border:0 !important; border-radius:8px !important; background:transparent !important; color:#fff !important; font-size:14px !important; font-weight:500 !important; box-shadow:none !important;}
  .seg button.on, .seg button[aria-pressed="true"]{background:#636366 !important; color:#fff !important; font-weight:600 !important; box-shadow:0 3px 8px rgba(0,0,0,.12) !important;}

  /* calculators and generators */
  .calc, #toolcard{background:transparent !important; border:0 !important; box-shadow:none !important; padding:0 !important;}
  html.kembed .calc{margin-top:14px !important;}
  .ws .drop{margin-top:16px !important;}
  .calc-in{border-radius:16px !important; background:#1C1C1F !important; box-shadow:none !important; padding:18px 16px !important;}
  .calc-out{border-radius:18px 18px 0 0 !important; background:rgba(28,28,31,.94) !important; box-shadow:0 -10px 30px rgba(0,0,0,.4) !important; border-top:0 !important;}
  .calc-out.gen, .calc-out.gen:not(.open){border-radius:16px !important; background:#1C1C1F !important; box-shadow:none !important;}
  .calc-out .calc-h::after{color:#DFFF3F !important; font-size:15px !important;}
  .calc-out .saveline .s-num{font-weight:700 !important; letter-spacing:-1px !important;}
  .calc-out .rows, .calc-out .rowline{border-color:rgba(255,255,255,.1) !important;}
  .calc-out .rowline{font-size:14px !important;}
  .calc-out .copybtn{height:48px !important; font-size:15px !important;}
  .calc-in .gen{height:50px !important; font-size:16px !important;}
  .calc-out .biocard, .calc-out .tagbox{border-radius:12px !important; background:#2A2A2E !important; box-shadow:none !important;}
  .calc-out .bar-track{border-radius:3px; overflow:hidden;}

  /* image tools after the files land (Resize, metadata, GPS, EXIF, HEIC) */
  .kapp{background:#0E0E10 !important;}
  .kapp-strip{background:rgba(14,14,16,.94) !important; border-bottom:.5px solid rgba(255,255,255,.1) !important;}
  html.kembed .kapp-lock{display:none !important;}
  .kapp-strip .btn-w{height:36px !important; padding:0 16px !important; border-radius:999px !important; font-size:15px !important;}
  .kapp-x{border-radius:999px !important; background:#2A2A2E !important; border:0 !important;}
  .kapp-tools{background:transparent !important; border:0 !important;}
  .kapp-opt{border:0 !important;}
  .kapp-qh{border:0 !important;}
  .kapp-list{padding:0 12px !important;}
  .kapp-row{margin:0 0 8px !important; border:0 !important; border-radius:12px !important; background:#1C1C1F !important; box-shadow:none !important;}
  .kapp-row.sel{box-shadow:inset 0 0 0 1.5px rgba(223,255,63,.6) !important;}
  .kapp-row .fn{font-size:15px !important; font-weight:500 !important;}
  .kapp-row .fs{font-size:12.5px !important;}
  .kapp .chips button{height:36px !important; border:0 !important; border-radius:999px !important; background:#2A2A2E !important; color:#fff !important; box-shadow:none !important; font-size:14px !important;}
  .kapp .chips button.on{background:rgba(223,255,63,.14) !important; color:#DFFF3F !important; box-shadow:inset 0 0 0 1px rgba(223,255,63,.5) !important;}
  .kapp .chips button span{color:rgba(235,235,245,.5) !important;}
  .kapp .chips button.on span{color:rgba(223,255,63,.7) !important;}
  .chip, .kapp-row .chip{border:0 !important; border-radius:999px !important; background:#2E2E33 !important; color:#fff !important; padding:4px 10px !important; height:auto !important;}
  .chip.bad{background:rgba(255,69,58,.16) !important; color:#FF6961 !important;}
  .kapp-track{border-radius:2px; overflow:hidden;}
  .kapp-status, .kapp-qf{display:none !important;}
  .kapp-sum b{letter-spacing:-.5px;}

  /* RAW to JPG */
  .ws-bar{border:0 !important;}
  .rcard{border:0 !important; border-radius:14px !important; overflow:hidden; background:#1C1C1F !important; box-shadow:none !important;}
  .rcard .ib{border-radius:10px !important;}
  .ws-set summary{border:0 !important; border-radius:12px !important; background:#1C1C1F !important;}
  .ws-set .panel{border:0 !important; border-radius:0 0 12px 12px !important; background:#1C1C1F !important;}
  .ws-go{background:rgba(14,14,16,.94) !important; border-top:.5px solid rgba(255,255,255,.1) !important;}

  /* White border */
  .bbtn{height:38px !important; border:0 !important; border-radius:10px !important; background:#2A2A2E !important; color:#fff !important; font-weight:500 !important; font-size:14px !important;}
  .bbtn.solid{background:#DFFF3F !important; color:#17171A !important; font-weight:600 !important;}
  .bbtn:disabled, .bbtn[disabled]{opacity:.4 !important;}
  .btop{border-bottom:.5px solid rgba(255,255,255,.1) !important; background:rgba(14,14,16,.94) !important;}
  .bapp-in{background:#0E0E10 !important;}
  .btabs{background:#0E0E10 !important; border-bottom:.5px solid rgba(255,255,255,.1) !important;}
  .bpresets button{height:34px !important; border:0 !important; border-radius:999px !important; background:#2A2A2E !important; color:#fff !important; font-size:14px !important;}
  .bpresets button.on{background:rgba(223,255,63,.14) !important; color:#DFFF3F !important; box-shadow:inset 0 0 0 1px rgba(223,255,63,.5) !important;}
  .bseg{border:0 !important; border-radius:10px !important; padding:2px !important; gap:2px !important; background:rgba(118,118,128,.24) !important;}
  .bseg button{border-radius:8px !important; color:#fff !important; font-size:13.5px !important; min-height:34px;}
  .bseg button.on{background:#636366 !important; color:#fff !important;}
  .bf{border:0 !important; border-radius:12px !important; background:#1C1C1F !important;}
  .bf.on{box-shadow:inset 0 0 0 1.5px #DFFF3F !important; background:rgba(223,255,63,.08) !important;}
  .bempty{gap:10px !important;}
  .bempty::after{content:"Choose photos"; margin-top:10px; display:inline-flex; align-items:center; height:48px; padding:0 28px; border-radius:12px; background:#DFFF3F; color:#17171A; font-size:16px; font-weight:600;}

  /* Text behind the photo */
  .tbdrop{border:0 !important; border-radius:16px !important; background:#1C1C1F !important;}
  .tbtop{border-bottom:.5px solid rgba(255,255,255,.1) !important; background:rgba(14,14,16,.94) !important;}
  html.kembed .tbtop-home, html.kembed .tbtop-t, html.kembed .tbtop-bar, html.kembed #tbClose{display:none !important;}
  html.kembed .tbtop{justify-content:flex-end !important;}
  html.kembed .tbtop-r{width:100%; justify-content:space-between;}
  .tbicon{border:0 !important; border-radius:10px !important; background:#2A2A2E !important; color:#fff !important;}
  .tbtop-save{height:38px !important; padding:0 16px !important; border-radius:10px !important;}
  .tbtop-new{height:38px !important; border-radius:10px !important;}
  .tbsec{border-bottom:.5px solid rgba(255,255,255,.1) !important;}
  .tbsech{font-size:15px !important;}
  .tbin{border:0 !important; border-radius:12px !important; background:#2A2A2E !important; font-size:16px !important;}
  .tbadd{border:0 !important; border-radius:12px !important; background:#2A2A2E !important; color:#fff !important; font-size:14.5px !important;}
  .tbpresets button, .tbpre{border:0 !important; border-radius:999px !important; background:#2A2A2E !important; color:#fff !important; font-size:14px !important; min-height:34px;}
  .tbpresets button.on, .tbpre.on{background:rgba(223,255,63,.14) !important; color:#DFFF3F !important;}
  .tbseg{border:0 !important; border-radius:10px !important; padding:2px !important; gap:2px !important; background:rgba(118,118,128,.24) !important;}
  .tbseg button{border:0 !important; border-radius:8px !important; background:transparent !important; color:#fff !important;}
  .tbseg button.on{background:#636366 !important; color:#fff !important;}
  .tbpanel .btn-o, .tblayers button{border-radius:12px !important;}
  .tbrow > *{border-radius:12px;}

  /* what next, and the rating */
  .tnext{border:0 !important;}
  .tnext-a{border:0 !important; border-radius:12px !important; background:#1C1C1F !important; margin-top:8px !important; box-shadow:none !important;}
  #ratebox > div{border-radius:16px !important;}
  .toast{border-radius:12px !important;}
}

/* ---- premium pass: the first screen is one idea and one button; the app
   screen is a settings card, the files, and one action at the thumb ---- */
@media (max-width:767px){
  /* first screen inside the transfer app: centred, quiet, the action pinned low */
  html.kembed .kapp-hero .drop, html.kembed .ws:not(.has) .drop{text-align:center;}
  html.kembed .kapp-hero{display:flex; flex-direction:column; min-height:calc(100vh - 24px); min-height:calc(100dvh - 24px); padding-top:28px !important; box-sizing:border-box;}
  html.kembed .kapp-hero .ws-h1, html.kembed .ws:not(.has) .ws-h1{max-width:16ch; margin-left:0 !important; margin-right:0 !important; text-align:left; font-size:30px !important; letter-spacing:-1px !important;}
  html.kembed .ws:not(.has) .ws-head{padding-top:28px !important;}
  html.kembed .ws .drop, html.kembed .kapp-hero .drop{flex:1 1 auto; justify-content:center !important; align-items:center !important; text-align:center !important; background:transparent !important; padding:20px 0 0 !important; margin-top:0 !important;}
  html.kembed .ws .drop .ico{width:64px !important; height:64px !important; margin:0 auto 20px !important; border-radius:50% !important; background:#1C1C1F !important; color:#fff !important; box-shadow:none !important;}
  html.kembed .ws .drop .ico svg{width:30px !important; height:30px !important;}
  html.kembed .ws .drop .big{font-size:21px !important; font-weight:600 !important; max-width:20ch; margin:0 auto;}
  html.kembed .ws .drop .sub{display:none !important;}
  html.kembed .ws .drop, html.kembed .kapp-hero .drop{width:100% !important; max-width:none !important; align-self:stretch !important; box-sizing:border-box;}
  html.kembed .ws:not(.has) .drop:not(:has(.ico)) .big::before{content:""; display:block; width:64px; height:64px; margin:0 auto 20px; border-radius:50%; background:#1C1C1F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3m0 0-4.5 4.5M12 3l4.5 4.5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E") center / 28px 28px no-repeat;}
  html.kembed .ws .drop .big::after{content:"Private. Nothing leaves your phone."; display:block; margin-top:8px; font-size:15px; font-weight:400; letter-spacing:0; color:rgba(235,235,245,.5);}
  html.kembed .ws:not(.has){display:flex; flex-direction:column; min-height:100vh; min-height:100dvh; box-sizing:border-box; padding-bottom:calc(16px + env(safe-area-inset-bottom)) !important;}
  html.kembed .ws:not(.has) .ws-body, html.kembed .ws:not(.has) .ws-steps{display:none !important;}
  html.kembed .ws:not(.has) .drop{display:flex !important; flex-direction:column !important;}
  html.kembed .ws .drop .ico, html.kembed .ws:not(.has) .drop .big{margin-top:auto !important;}
  html.kembed .ws:not(.has) .drop .ico ~ .big{margin-top:0 !important;}
  /* the primary sits at the thumb, the sample is a quiet line above it */
  html.kembed .ws .drop .row{position:static; width:100%; align-self:stretch !important; box-sizing:border-box; display:flex !important; flex-direction:column-reverse !important; align-items:stretch !important; gap:6px !important; margin:auto 0 0 !important;}
  html.kembed .ws .drop .row .btn-w{width:100% !important; height:54px !important; border-radius:14px !important; font-size:17px !important; justify-content:center;}
  html.kembed .ws .drop .row .btn-o, html.kembed .ws .drop .row .btn-g{width:100% !important; height:40px !important; background:transparent !important; color:rgba(235,235,245,.6) !important; font-size:15px !important; font-weight:500 !important; justify-content:center;}
  html.kembed .ws .drop .row #folderBtn{display:none !important;}
  html.kembed .kapp-hero{width:100% !important; margin:0 !important; flex:1 1 auto;}
  html.kembed .kapp-hero{padding-bottom:calc(16px + env(safe-area-inset-bottom)) !important;}
  html.kembed body > div:has(#ratebox), html.kembed .tnext{background:transparent !important; border:0 !important;}

  /* Text behind the photo: the same first screen */
  html.kembed .tbdrop:not([hidden]){display:flex !important; flex-direction:column; align-items:center; justify-content:flex-start; min-height:calc(100vh - 44px); min-height:calc(100dvh - 44px); box-sizing:border-box; padding:28px 0 calc(16px + env(safe-area-inset-bottom)) !important; background:transparent !important; text-align:center;}
  html.kembed div:has(> .tbwrap), html.kembed div:has(> div > .tbwrap), html.kembed .tbwrap{background:transparent !important;}
  html.kembed .tbdropico{display:flex !important; align-items:center; justify-content:center; order:1; width:64px !important; height:64px !important; margin:auto auto 20px !important; border-radius:50% !important; background:#1C1C1F !important; color:#fff !important; box-shadow:none !important;}
  html.kembed .tbdroph{order:2; font-size:21px !important; font-weight:600 !important; max-width:18ch;}
  html.kembed .tbdrops{display:none !important;}
  html.kembed .tbdroph::after{content:"Private. Nothing leaves your phone."; display:block; margin-top:8px; font-size:15px; font-weight:400; letter-spacing:0; color:rgba(235,235,245,.5);}
  html.kembed .tbdropb{order:4; width:100%; margin-top:auto !important;}
  html.kembed .tbdropb .btn-w{width:100% !important; height:54px !important; border-radius:14px !important; font-size:17px !important; justify-content:center;}

  /* the app screen: one settings card */
  .kapp{grid-template-rows:auto auto minmax(0,1fr) auto !important;}
  .kapp-strip{height:52px !important; padding:0 12px 0 16px !important; justify-content:flex-end;}
  .kapp-tools{margin:12px 16px 0 !important; padding:0 !important; border-radius:14px !important; background:#1C1C1F !important; overflow:hidden;}
  .kapp-opt{position:relative; width:100%; box-sizing:border-box; display:flex !important; align-items:center !important; gap:12px !important; min-height:50px; margin:0 !important; padding:6px 16px !important; flex-wrap:wrap;}
  .kapp-opt + .kapp-opt::before{content:""; position:absolute; left:16px; right:0; top:0; height:.5px; background:rgba(255,255,255,.1);}
  .kapp-opt .fl, .kapp-opt > label:not(.chk){flex:0 0 76px; margin:0 !important; font-size:15px !important; color:#fff !important;}
  .kapp-opt .hint{display:none !important;}
  .kapp-opt:not(:has(> :not(.hint))), .kapp-opt:has(> .hint:only-child){display:none !important;}
  .kapp-sum{border-top:0 !important;}
  .kapp-tools:has(.kapp-opt label, .kapp-opt .seg, .kapp-opt .chips, .kapp-opt select) .kapp-sum{border-top:.5px solid rgba(255,255,255,.1) !important;}
  .kapp-opt:has(label.chk) .fl{display:none !important;}
  .kapp-opt label.chk{flex:1 1 auto; width:100%; display:flex !important; flex-direction:row-reverse; justify-content:space-between; align-items:center; gap:12px; min-height:38px; font-size:15px !important; color:#fff !important;}
  .kapp-opt .seg{flex:0 1 auto;}
  .kapp-opt .chips{flex:1 1 0; min-width:0; display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; padding:2px 0;}
  .kapp-opt .chips::-webkit-scrollbar{display:none;}
  .kapp-opt .chips button{flex:none;}
  .kapp-sum{order:99; display:flex !important; align-items:baseline; gap:8px; width:100%; margin:0 !important; padding:14px 16px 12px !important; box-sizing:border-box;}
  .kapp-sum b{font-size:22px !important; font-weight:700 !important;}
  .kapp-sum span{font-size:13.5px !important; color:rgba(235,235,245,.55) !important;}

  /* iOS switches for the yes/no settings */
  .kapp-opt input[type=checkbox], .ws-set input[type=checkbox], .calc-in input[type=checkbox]{-webkit-appearance:none; appearance:none; flex:none; position:relative; width:51px !important; height:31px !important; margin:0 !important; border-radius:999px; background:#39393D; cursor:pointer; transition:background .2s ease;}
  .kapp-opt input[type=checkbox]::after, .ws-set input[type=checkbox]::after, .calc-in input[type=checkbox]::after{content:""; position:absolute; top:2px; left:2px; width:27px; height:27px; border-radius:50%; background:#fff; box-shadow:0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); transition:transform .22s cubic-bezier(.2,.7,.2,1);}
  .kapp-opt input[type=checkbox]:checked, .ws-set input[type=checkbox]:checked, .calc-in input[type=checkbox]:checked{background:#DFFF3F;}
  .kapp-opt input[type=checkbox]:checked::after, .ws-set input[type=checkbox]:checked::after, .calc-in input[type=checkbox]:checked::after{transform:translateX(20px);}

  /* files: a header line, roomy rows */
  .kapp-qh{padding:16px 20px 8px !important; min-height:0 !important;}
  .kapp-qh span{font-size:13px !important; color:rgba(235,235,245,.55) !important;}
  .kapp-qh .btn-g{height:auto !important; padding:4px 0 !important; background:none !important; color:rgba(235,235,245,.7) !important; font-size:15px !important;}
  .kapp-list{padding:0 16px calc(96px + env(safe-area-inset-bottom)) !important;}
  .kapp-row{padding:14px 16px !important; margin-bottom:10px !important;}
  .kapp-row.sel{box-shadow:none !important;}
  .kapp-track{height:3px !important; margin-top:10px !important; background:rgba(255,255,255,.08) !important;}
  .kapp-track i{background:#DFFF3F !important;}
  .kapp-row .rm{width:28px; height:28px; border-radius:50% !important; background:#2E2E33 !important; color:rgba(235,235,245,.7) !important;}

  /* the one action: full width, at the thumb */
  .kapp-strip #zipBtn, .kapp-strip .btn-w{position:fixed !important; left:16px; right:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:90; height:54px !important; border-radius:14px !important; justify-content:center; font-size:17px !important; box-shadow:none !important;}
  .kapp-strip #zipBtn:disabled, .kapp-strip .btn-w:disabled{background:#2A2A2E !important; color:rgba(235,235,245,.4) !important; opacity:1 !important;}
  .kapp::after{content:""; position:fixed; left:0; right:0; bottom:0; height:calc(86px + env(safe-area-inset-bottom)); background:#0E0E10; border-top:.5px solid rgba(255,255,255,.1); pointer-events:none; z-index:85;}

  .ws-set{box-shadow:none !important; background:#1C1C1F !important; border-radius:14px !important; overflow:hidden;}
  .ws-set summary{padding:15px 16px !important; font-size:15px !important; border-radius:0 !important; background:transparent !important;}
  .ws-set summary::after{font-size:15px !important; color:rgba(235,235,245,.5) !important;}
  .ws-set .panel{border-top:.5px solid rgba(255,255,255,.1) !important;}
  .ws-set .ir{border-color:rgba(255,255,255,.1) !important;}
  .ib{border:0 !important; border-radius:10px !important; background:#2E2E33 !important; color:#fff !important; width:36px !important; height:36px !important;}
  .ws-bar .btn-g{font-size:15px !important; color:rgba(235,235,245,.7) !important; background:none !important;}
  .ws-count{font-size:13px !important; color:rgba(235,235,245,.55) !important;}
  .rgrid{gap:12px !important;}
  .rcard .bd{padding:12px !important;}
  .rcard .fn{font-size:14.5px !important; font-weight:500 !important;}
  .ws-go{padding:12px 16px calc(12px + env(safe-area-inset-bottom)) !important;}
  .ws-note{color:rgba(235,235,245,.45) !important;}
  /* motion: things arrive, and answer the touch */
  @media (prefers-reduced-motion:no-preference){
    .kapp-row, .rcard, .calc-out .biocard, .calc-out .tagbox{animation:kin .32s cubic-bezier(.2,.7,.2,1) both;}
    @keyframes kin{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;}}
  }
  .btn-w, .btn-o, .bbtn, .seg button, .chips button, .bpresets button, .tbpre, .kapp-row, .rcard, .copybtn{transition:transform .12s ease, background-color .15s ease, box-shadow .15s ease !important;}
  .btn-w:active, .btn-o:active, .bbtn:active, .copybtn:active, .chips button:active, .bpresets button:active{transform:scale(.97);}
}
@media (max-width:767px){
  html.kembed .ws .drop .row #sampleBtn{font-size:0 !important;}
  html.kembed .ws .drop .row #sampleBtn::after{content:"Try a sample"; font-size:15px;}
}

/* ---- mature pass: monochrome, one quiet card to tap, white for the action ----
   Lime stays only where state changes (a switch that is on, progress).
   Everything you press is white on black or grey on black. */
@media (max-width:767px){
  /* type */
  html.kembed .ws-h1, html.kembed h1.ws-h1{font-size:28px !important; font-weight:600 !important; letter-spacing:-.6px !important; line-height:1.15 !important; max-width:none !important;}
  /* actions: white, not neon */
  .ws .btn-w, .btn-w, .calc .copybtn.gen, .calc-in .gen, #convertAll, .bbtn.solid, .tbtop-save, .kapp-strip #zipBtn, .kapp-strip .btn-w{background:#DFFF3F !important; color:#17171A !important; border-radius:12px !important; font-weight:600 !important; box-shadow:none !important;}
  .ws .btn-w:hover, .btn-w:hover{background:#E8FF66 !important;}
  .kapp-strip #zipBtn, .kapp-strip .btn-w, #convertAll, .btn-w.big{height:50px !important; font-size:16px !important;}
  .kapp-strip #zipBtn:disabled, .kapp-strip .btn-w:disabled, .bbtn.solid:disabled{background:#2A2A2E !important; color:rgba(235,235,245,.35) !important;}
  /* selections: neutral, not lime */
  .kapp .chips button.on, .bpresets button.on, .tbpresets button.on, .tbpre.on{background:#DFFF3F !important; color:#17171A !important; box-shadow:none !important;}
  .kapp .chips button.on span{color:rgba(23,23,26,.6) !important;}
  .bf.on{background:rgba(223,255,63,.08) !important; box-shadow:inset 0 0 0 1.5px #DFFF3F !important;}
  .calc-out .calc-h::after{color:#DFFF3F !important;}
  .chip, .kapp-row .chip{background:#2A2A2E !important; color:rgba(235,235,245,.8) !important; font-weight:500 !important;}
  .chip.bad{background:#2A2A2E !important; color:#FF6961 !important;}
  .tbin{box-shadow:none !important; border:0 !important;}

  /* the first screen: a title, then one card you tap */
  html.kembed .ws:not(.has), html.kembed .kapp-hero{min-height:0 !important;}
  html.kembed .kapp-hero{padding-top:20px !important;}
  html.kembed .ws:not(.has) .ws-head{padding-top:20px !important;}
  html.kembed .ws .drop, html.kembed .kapp-hero .drop{flex:0 0 auto !important; margin-top:20px !important; padding:36px 20px 18px !important; border-radius:16px !important; background:#1C1C1F !important; text-align:center !important;}
  html.kembed .ws .drop:active{background:#232327 !important;}
  html.kembed .ws .drop .ico, html.kembed .ws:not(.has) .drop .big{margin-top:0 !important;}
  html.kembed .ws .drop .ico{width:auto !important; height:auto !important; margin:0 auto 12px !important; background:none !important; border-radius:0 !important; color:#DFFF3F !important;}
  html.kembed .ws .drop .ico svg{width:28px !important; height:28px !important;}
  html.kembed .ws .drop .big{display:none !important;}
  html.kembed .ws:not(.has) .drop:not(:has(.ico)) .row::before{content:""; display:block; width:28px; height:28px; margin:0 auto 12px; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DFFF3F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3m0 0-4.5 4.5M12 3l4.5 4.5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E") center / 28px no-repeat;}
  html.kembed .ws .drop .row{flex-direction:column !important; gap:0 !important; margin:0 !important;}
  html.kembed .ws .drop .row .btn-w{height:auto !important; padding:0 !important; background:none !important; color:#DFFF3F !important; font-size:17px !important; font-weight:600 !important;}
  html.kembed .ws .drop .row .btn-w::after{content:"Private. Nothing is uploaded."; display:block; position:absolute; left:0; right:0; top:100%; margin-top:4px; font-size:13px; font-weight:400; color:rgba(235,235,245,.45);}
  html.kembed .ws .drop .row .btn-w{position:relative; margin-bottom:34px !important;}
  html.kembed .ws .drop .row #sampleBtn{width:100% !important; height:50px !important; margin:6px 0 0 !important; padding:12px 0 0 !important; border-top:.5px solid rgba(255,255,255,.1) !important; border-radius:0 !important; box-sizing:border-box !important;}
  html.kembed .ws .drop .row #sampleBtn::after{color:rgba(235,235,245,.6); font-size:14px; font-weight:500;}

  /* Text behind the photo, the same */
  html.kembed .tbdrop:not([hidden]){min-height:0 !important; margin-top:20px; padding:36px 20px 30px !important; border-radius:16px !important; background:#1C1C1F !important; justify-content:center;}
  html.kembed .tbdropico{margin:0 auto 12px !important; width:auto !important; height:auto !important; background:none !important; color:#DFFF3F !important;}
  html.kembed .tbdroph{display:none !important;}
  html.kembed .tbdropb{margin-top:0 !important;}
  html.kembed .tbdropb .btn-w{height:auto !important; padding:0 !important; background:none !important; color:#DFFF3F !important; font-size:17px !important; position:relative; margin-bottom:22px;}
  html.kembed .tbdropb .btn-w::after{content:"Private. Nothing is uploaded."; position:absolute; left:0; right:0; top:100%; margin-top:4px; font-size:13px; font-weight:400; color:rgba(235,235,245,.45);}

  /* White border's empty canvas */
  .bempty::after{background:#DFFF3F !important; color:#17171A !important; border-radius:12px !important; height:46px !important; font-size:16px !important;}
}
@media (max-width:767px){
  html.kembed .ws{border-bottom:0 !important;}
  html.kembed body > div:not(.toast):not(.kapp), html.kembed .wrap{background:transparent !important;}
}

/* ---- structure: a tool says what it is; options fold behind one row ---- */
@media (max-width:767px){
  html.mtool .ws-h1{font-size:30px !important; font-weight:700 !important; letter-spacing:-.8px !important; text-align:left !important; margin:0 !important;}
  html.mtool .mth{display:block !important; padding:22px 0 0; color:#fff;}
  html.mtool .tbdrop[hidden] ~ .mtsub, html.mtool .mth:has(~ .tbdrop[hidden]){display:none !important;}
  html.mtool .mtsub{margin:6px 0 0 !important; font-size:15px; line-height:1.4; color:rgba(235,235,245,.55); text-align:left; max-width:34ch;}
  html.mtool .ws-head .mtsub{margin-bottom:0 !important;}
  html.mtool .tbdrop:not([hidden]){margin-top:22px !important;}
  /* the app bar: close on the left, the tool's name in the middle */
  html.mtool .kapp-strip{position:relative; justify-content:center !important;}
  html.mtool .kapp-strip .kapp-crumb{display:flex !important; position:absolute; left:50%; transform:translateX(-50%); font-size:0;}
  html.mtool .kapp-strip .kapp-crumb a, html.mtool .kapp-strip .kapp-crumb span{display:none !important;}
  html.mtool .kapp-strip .kapp-crumb b{font-size:17px; font-weight:600; color:#fff; letter-spacing:-.2px;}
  html.mtool .kapp-x{position:absolute !important; left:12px; top:50%; transform:translateY(-50%);}
  html.mtool .kapp-live, html.mtool #kappTools2 > .sp{display:none !important;}
  html.mtool .kapp-strip .kapp-crumb, html.mtool .kapp-strip .kapp-crumb b{border:0 !important; padding:0 !important; margin:0 !important; background:none !important;}
  html.mtool .kapp-strip .kapp-crumb::before, html.mtool .kapp-strip .kapp-crumb::after{display:none !important;}
  html.mtool .wrap > .ws-head, html.mtool .calc ~ .ws-head{padding-top:22px !important;}
  html.mtool body > .wrap{padding-top:0 !important;}
  /* the bottom bar: Add files beside the one action */
  html.mtool .kapp-strip #addMore{display:inline-flex !important; position:fixed !important; left:16px; bottom:calc(16px + env(safe-area-inset-bottom)); z-index:90; width:calc(36% - 20px); height:50px !important; justify-content:center; border-radius:12px !important; background:#2A2A2E !important; color:#fff !important; font-size:16px !important; font-weight:500 !important;}
  html.mtool .kapp-strip #zipBtn{left:calc(36% + 4px) !important;}
  html.mtool .kapp-strip #saveTo, html.mtool .kapp-strip #sendKepla{display:none !important;}
  /* options folded */
  html.mtool .mopt{display:flex; align-items:center; gap:12px; width:100%; min-height:50px; padding:0 16px; border:0; background:none; color:#fff; font:inherit; font-size:15px; text-align:left; cursor:pointer;}
  html.mtool .mopt span{flex:none;}
  html.mtool .mopt em{flex:1 1 auto; min-width:0; font-style:normal; text-align:right; color:rgba(235,235,245,.5); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  html.mtool .mopt::after{content:""; flex:none; width:7px; height:7px; border-right:2px solid rgba(235,235,245,.35); border-bottom:2px solid rgba(235,235,245,.35); transform:rotate(45deg); margin:-4px 2px 0 0; transition:transform .2s ease;}
  html.mtool .mopen .mopt::after{transform:rotate(-135deg); margin-top:4px;}
  html.mtool #kappTools2:not(.mopen) .kapp-opt{display:none !important;}
  html.mtool #kappTools2.mopen .kapp-opt:first-of-type::before, html.mtool #kappTools2 .kapp-opt::before{left:16px;}
  html.mtool #kappTools2.mopen .mopt + .kapp-opt::before{content:""; position:absolute; left:16px; right:0; top:0; height:.5px; background:rgba(255,255,255,.1);}
  html.mtool #kappTools2 .kapp-sum{border-top:.5px solid rgba(255,255,255,.1) !important;}
  html.mtool #kappTools2:not(:has(.mopt)) .kapp-sum{border-top:0 !important;}
}

/* one bar only: the transfer app's (Tools back, Open). The tool's own bar
   folds away and keeps just its two bottom buttons. */
@media (max-width:767px){
  html.mtool .kapp-strip{height:0 !important; min-height:0 !important; padding:0 !important; border:0 !important; overflow:visible !important; background:none !important;}
  html.mtool .kapp-strip .kapp-crumb, html.mtool .kapp-x, html.mtool .kapp-lock{display:none !important;}
  html.mtool .kapp-tools{margin-top:16px !important;}
}

/* ================= desktop and tablet =================
   The same language as the phone: black ground, rounded cards with no
   outlines, filled fields, iOS segments and switches, lime for the action.
   Inside the transfer app a tool also drops its marketing copy. */
@media (min-width:768px){
  html.kembed, html.kembed body{background:#0E0E10 !important;}
  html.kembed body > div:not(.toast):not(.kapp), html.kembed .wrap{background:transparent !important;}
  html.kembed .ws{border-bottom:0 !important;}
  html.kembed .ws-k, html.kembed .kapp-lede, html.kembed .kapp-proof, html.kembed .ws-sub, html.kembed .lede, html.kembed .ws-steps, html.kembed .fmts, html.kembed .tnext{display:none !important;}
  html.kembed .ws-h1, html.kembed h1.ws-h1{font-size:34px !important; font-weight:600 !important; letter-spacing:-1px !important; line-height:1.15 !important; max-width:none !important;}
  html.mtool .mtsub{margin:8px 0 0; font-size:16px; line-height:1.45; color:rgba(235,235,245,.55); max-width:60ch;}
  html.kembed .kapp-hero, html.kembed .ws:not(.has) .ws-head, html.kembed .wrap > .ws-head{padding-top:40px !important;}

  /* buttons */
  .ws .btn-w, .btn-w, .calc .copybtn, .calc-in .gen, #convertAll, .bbtn.solid, .tbtop-save{border:0 !important; border-radius:12px !important; background:#DFFF3F !important; color:#17171A !important; font-weight:600 !important; box-shadow:none !important;}
  .ws .btn-w:hover, .btn-w:hover, .calc .copybtn:hover, #convertAll:hover{background:#E8FF66 !important;}
  .ws .btn-o, .btn-o, .bbtn:not(.solid), .tbicon{border:0 !important; border-radius:10px !important; background:#2A2A2E !important; color:#fff !important; box-shadow:none !important;}
  .ws .btn-o:hover, .btn-o:hover, .bbtn:not(.solid):hover{background:#36363B !important;}
  .ws .btn-g, .btn-g{border-radius:10px !important; color:rgba(235,235,245,.7) !important;}
  .btn-w:disabled, .bbtn.solid:disabled, #zipBtn:disabled{background:#2A2A2E !important; color:rgba(235,235,245,.35) !important;}

  /* first screen: one quiet card */
  .ws .drop, .drop, .tbdrop, .bhead .drop.bland{border:0 !important; border-radius:20px !important; background:#1C1C1F !important; box-shadow:none !important;}
  .ws .drop:hover, .drop:hover{background:#222226 !important;}
  .ws .drop .ico, .drop .ico{border:0 !important; border-radius:50% !important; background:#2A2A2E !important; color:#DFFF3F !important;}
  .ws .drop .big{font-weight:600 !important; letter-spacing:-.4px !important;}
  .ws .drop .sub{color:rgba(235,235,245,.5) !important;}
  .ws .drop .row .btn-w, .ws .drop .row .btn-o{height:46px !important; padding:0 22px !important; font-size:15px !important;}
  .ws .drop .row .btn-o{background:transparent !important; color:rgba(235,235,245,.7) !important;}
  .ws .drop .row .btn-o:hover{background:#2A2A2E !important; color:#fff !important;}

  /* fields, segments, switches */
  .calc-in input.num, .calc-in input.txt2, .calc-in select, .calc-in textarea, .ws select.sel, .ws input.sel{border:0 !important; border-radius:12px !important; background-color:#2A2A2E !important; box-shadow:none !important; color:#fff !important;}
  .calc-in select, .ws select.sel{-webkit-appearance:none; appearance:none; padding-right:36px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-opacity='.45' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right 14px center !important; background-size:12px 8px !important;}
  .seg, .kapp-opt .seg, .bseg, .tbseg{display:inline-flex !important; gap:2px !important; padding:2px !important; border:0 !important; border-radius:10px !important; background:rgba(118,118,128,.24) !important; box-shadow:none !important;}
  .seg button, .kapp-opt .seg button, .bseg button, .tbseg button{border:0 !important; border-radius:8px !important; background:transparent !important; color:#fff !important; box-shadow:none !important;}
  .seg button.on, .kapp-opt .seg button.on, .bseg button.on, .tbseg button.on{background:#636366 !important; color:#fff !important; font-weight:600 !important;}
  .kapp-opt input[type=checkbox], .ws-set input[type=checkbox], .calc-in input[type=checkbox], .ir input[type=checkbox]{-webkit-appearance:none; appearance:none; flex:none; position:relative; width:38px !important; height:22px !important; margin:0 !important; border-radius:999px; background:#39393D; cursor:pointer; transition:background .2s ease; vertical-align:middle;}
  .kapp-opt input[type=checkbox]::after, .ws-set input[type=checkbox]::after, .calc-in input[type=checkbox]::after, .ir input[type=checkbox]::after{content:""; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:#fff; transition:transform .2s cubic-bezier(.2,.7,.2,1);}
  .kapp-opt input[type=checkbox]:checked, .ws-set input[type=checkbox]:checked, .calc-in input[type=checkbox]:checked, .ir input[type=checkbox]:checked{background:#DFFF3F;}
  .kapp-opt input[type=checkbox]:checked::after, .ws-set input[type=checkbox]:checked::after, .calc-in input[type=checkbox]:checked::after, .ir input[type=checkbox]:checked::after{transform:translateX(16px);}
  .fl, .kapp-opt .fl, .calc-out .calc-h, .ws label.fl, .tnext-k{text-transform:none !important; letter-spacing:0 !important; font-size:13px !important; font-weight:500 !important; color:rgba(235,235,245,.55) !important;}
  .chip, .kapp-row .chip{border:0 !important; border-radius:999px !important; background:#2A2A2E !important; color:rgba(235,235,245,.85) !important;}
  .chip.bad{color:#FF6961 !important;}
  .kapp .chips button, .bpresets button, .tbpre{border:0 !important; border-radius:999px !important; background:#2A2A2E !important; color:#fff !important;}
  .kapp .chips button.on, .bpresets button.on, .tbpre.on{background:#DFFF3F !important; color:#17171A !important;}
  .kapp .chips button.on span{color:rgba(23,23,26,.6) !important;}

  /* calculators */
  .calc, #toolcard{background:transparent !important; border:0 !important; box-shadow:none !important;}
  .calc-in, .calc-out{border:0 !important; border-radius:20px !important; background:#1C1C1F !important; box-shadow:none !important;}
  .calc-out .rows, .calc-out .rowline{border-color:rgba(255,255,255,.08) !important;}
  .calc-out .biocard, .calc-out .tagbox{border-radius:12px !important; background:#2A2A2E !important; box-shadow:none !important;}

  /* the image tools' app screen */
  .kapp{background:#0E0E10 !important;}
  html.kembed .kapp-lock, html.kembed .kapp-crumb a, html.kembed .kapp-crumb span{display:none !important;}
  html.kembed .kapp-crumb{border:0 !important; padding:0 !important;}
  html.kembed .kapp-crumb b{font-size:16px; font-weight:600; letter-spacing:-.2px;}
  .kapp-strip{background:#0E0E10 !important; border-bottom:1px solid rgba(255,255,255,.06) !important; height:60px !important;}
  .kapp-strip .btn-w, .kapp-strip .btn-o, .kapp-strip .btn-g{height:38px !important; padding:0 16px !important; font-size:14px !important;}
  .kapp-x{border:0 !important; border-radius:10px !important; background:#2A2A2E !important;}
  .kapp-tools{background:#141417 !important; border-bottom:1px solid rgba(255,255,255,.06) !important;}
  .kapp-opt .hint{color:rgba(235,235,245,.4) !important;}
  .kapp-queue{background:#0E0E10 !important; border-right:1px solid rgba(255,255,255,.06) !important;}
  .kapp-list{padding:0 12px !important;}
  .kapp-row{margin:0 0 8px !important; border:0 !important; border-radius:12px !important; background:#1C1C1F !important; box-shadow:none !important;}
  .kapp-row.sel{background:#232327 !important; box-shadow:inset 0 0 0 1.5px rgba(223,255,63,.55) !important;}
  .kapp-track{height:3px !important; border-radius:2px; background:rgba(255,255,255,.08) !important; overflow:hidden;}
  .kapp-track i{background:#DFFF3F !important;}
  .kapp-qh, .kapp-qf{border:0 !important;}
  .kapp-insp, .kapp-insp-top, .kapp-facts{background:#0E0E10 !important; border-color:rgba(255,255,255,.06) !important;}
  .kapp-status{background:#0E0E10 !important; border-top:1px solid rgba(255,255,255,.06) !important; color:rgba(235,235,245,.4) !important;}
  .kapp-status kbd, .kapp kbd{border:0 !important; border-radius:6px !important; background:#2A2A2E !important;}

  /* RAW */
  .rcard{border:0 !important; border-radius:16px !important; overflow:hidden; background:#1C1C1F !important; box-shadow:none !important;}
  .ib{border:0 !important; border-radius:8px !important; background:#2A2A2E !important; color:#fff !important;}
  .ws-set{box-shadow:none !important; border:0 !important; border-radius:16px !important; background:#1C1C1F !important; padding:4px 16px !important;}
  .ws-side .panel, .ws-set .panel{border:0 !important; background:transparent !important;}
  .ws-set .ir{border-color:rgba(255,255,255,.07) !important;}
  .ws-set summary, .ws-side > .fl{color:rgba(235,235,245,.55) !important;}

  /* White border and Text behind */
  .bapp-in{border:0 !important; border-radius:20px !important; background:#141417 !important;}
  .btop, .tbtop{background:#0E0E10 !important; border-bottom:1px solid rgba(255,255,255,.06) !important;}
  .bf{border:0 !important; border-radius:12px !important; background:#1C1C1F !important;}
  .bf.on{box-shadow:inset 0 0 0 1.5px #DFFF3F !important; background:rgba(223,255,63,.06) !important;}
  .tbin{border:0 !important; border-radius:12px !important; background:#2A2A2E !important;}
  .tbadd{border:0 !important; border-radius:12px !important; background:#2A2A2E !important; color:#fff !important;}

  .ws-set .panel, .ws-side .panel{box-shadow:none !important; border:0 !important; background:transparent !important;}
  html.kembed .ws-stephead{display:none !important;}
  .kapp-det .k, .ws-stephead{text-transform:none !important; letter-spacing:0 !important; font-size:12.5px !important; font-weight:500 !important; color:rgba(235,235,245,.5) !important;}
  .kapp-det{border-color:rgba(255,255,255,.06) !important;}
  /* motion */
  .btn-w, .btn-o, .bbtn, .copybtn, .chips button, .bpresets button, .kapp-row, .rcard, .drop{transition:background-color .15s ease, transform .12s ease, box-shadow .15s ease !important;}
  .btn-w:active, .btn-o:active, .bbtn:active, .copybtn:active{transform:scale(.98);}
}

/* ---- phone first: White border ----
   The photo keeps the screen. One set of controls shows at a time, picked from a bar at the thumb.
   One action, top right. Square corners and hairlines, as in the gallery; lime only on that action. */
@media (max-width:767px){
  html.bphone .bapp:not([hidden]){position:fixed !important; inset:0; z-index:140; width:auto !important; margin:0 !important; padding:0 !important; background:#0E0E10 !important; display:flex; flex-direction:column;}
  html.bphone .bapp-in{flex:1 1 auto; min-height:0; width:100%; max-width:none !important; margin:0 !important; border:0 !important; border-radius:0 !important; background:#0E0E10 !important; display:flex !important; flex-direction:column;}
  /* the top: add on the left, the one action on the right */
  html.bphone .btop{flex:none; height:52px !important; min-height:0 !important; padding:0 12px 0 4px !important; gap:4px !important; flex-wrap:nowrap !important; background:#0E0E10 !important; border-bottom:0 !important;}
  html.bphone .btop-l{flex:1 1 auto; gap:2px !important;}
  html.bphone .btop #addBtn{width:44px !important; height:44px !important; padding:0 !important; justify-content:center; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.76) !important;}
  html.bphone .btop #addBtn span{display:none !important;}
  html.bphone .btop #addBtn svg{width:20px; height:20px; stroke-width:1.7;}
  html.bphone .btop #addBtn:active{color:#fff !important;}
  html.bphone .btop .bcount{display:block !important; font-size:13px !important; font-weight:500 !important; color:rgba(255,255,255,.55) !important; font-variant-numeric:tabular-nums;}
  html.bphone .btop #exportOne, html.bphone .btop #clearBtn, html.bphone .btop .btop-bar{display:none !important;}
  html.bphone .btop #exportBtn{height:36px !important; padding:0 18px !important; border:0 !important; border-radius:0 !important; background:#DFFF3F !important; color:#17171A !important; font-size:14px !important; font-weight:600 !important;}
  html.bphone .btop #exportBtn:disabled{background:transparent !important; color:rgba(255,255,255,.35) !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.16) !important; opacity:1 !important;}
  html.bphone .bapp-in:has(.bpanel[data-m="file"] #bOut:not([hidden])) .btop #exportBtn{background:transparent !important; color:#fff !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.42) !important;}
  /* the photo */
  html.bphone .bbody{flex:1 1 auto !important; min-height:0 !important; height:auto !important; display:flex !important; flex-direction:column !important;}
  html.bphone .bstage{order:1; flex:1 1 auto !important; min-height:0 !important; height:auto !important; padding:4px 16px 14px !important; background:#0E0E10 !important; background-image:none !important;}
  html.bphone .bcanvas canvas{box-shadow:none !important;}
  html.bphone .bstage-f{display:none !important;}
  /* the other photos, only when there are any */
  html.bphone .bstrip{order:2; flex:none; display:none !important;}
  html.bphone .bapp.many .bstrip{display:flex !important; flex-direction:row; gap:6px; overflow-x:auto; overflow-y:hidden; padding:0 16px 10px !important; border:0 !important; background:transparent !important; scrollbar-width:none;}
  html.bphone .bstrip::-webkit-scrollbar{display:none;}
  html.bphone .bth{width:44px !important; height:44px !important; border-radius:0 !important; opacity:.55;}
  html.bphone .bth.on{opacity:1; box-shadow:none !important; outline:1.5px solid #fff; outline-offset:-1.5px;}
  html.bphone .bth.add{display:none !important;}
  html.bphone .bth-x{display:none !important;}
  /* the controls: one set at a time */
  html.bphone .bpanel{order:3; flex:none !important; display:flex !important; flex-direction:column; justify-content:flex-end; min-height:222px; overflow:visible !important; border:0 !important; background:#0E0E10 !important;}
  html.bphone .btabs{display:none !important;}
  html.bphone .bpanel > .bgroup, html.bphone .bpanel > .bout{display:none !important; padding:0 16px !important; border:0 !important; background:transparent !important;}
  html.bphone .bpanel[data-m="style"] > .bgroup[data-m="style"], html.bphone .bpanel[data-m="border"] > .bgroup[data-m="border"], html.bphone .bpanel[data-m="text"] > .bgroup[data-m="text"], html.bphone .bpanel[data-m="file"] > .bgroup[data-m="file"]{display:block !important;}
  html.bphone .bpanel[data-m="file"] > .bout:not([hidden]){display:block !important;}
  html.bphone .bpanel[data-m="file"]:has(> .bout:not([hidden])) > .bgroup{display:none !important;}
  html.bphone .bmodes{order:99; flex:none; display:flex; margin-top:12px; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid rgba(255,255,255,.09);}
  html.bphone .bmodes button{position:relative; flex:1 1 0; min-width:0; height:50px; padding:0; border:0; border-radius:0; background:transparent; color:rgba(255,255,255,.5); font-family:inherit; font-size:14px; font-weight:500; letter-spacing:0; -webkit-tap-highlight-color:transparent; transition:color .14s ease;}
  html.bphone .bmodes button.on{color:#fff;}
  html.bphone .bmodes button.on::after{content:""; position:absolute; left:0; right:0; top:-1px; height:1px; background:#fff;}
  /* labels */
  html.bphone .bg-h{margin:0 !important; font-family:inherit !important; font-size:13px !important; font-weight:500 !important; letter-spacing:0 !important; text-transform:none !important; color:rgba(255,255,255,.55) !important;}
  html.bphone .bg-h output{color:#fff !important; font-variant-numeric:tabular-nums;}
  html.bphone .bhint{display:none !important;}
  /* Style: three rows that slide sideways, no boxes */
  html.bphone .bgroup[data-m="style"] .bg-h{display:none !important;}
  html.bphone .bpresets, html.bphone .bframes, html.bphone .bswatches{display:flex !important; flex-wrap:nowrap !important; gap:0 !important; margin:0 -16px !important; padding:0 6px !important; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -webkit-overflow-scrolling:touch;}
  html.bphone .bpresets::-webkit-scrollbar, html.bphone .bframes::-webkit-scrollbar, html.bphone .bswatches::-webkit-scrollbar{display:none;}
  html.bphone .bpresets button{flex:none; height:44px !important; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:rgba(255,255,255,.55) !important; font-size:14px !important; font-weight:500 !important; white-space:nowrap;}
  html.bphone .bpresets button.on{color:#fff !important; background:transparent !important; box-shadow:inset 0 -1px 0 #fff !important;}
  html.bphone .bf{flex:none; width:56px; height:60px; padding:0 !important; gap:7px !important; justify-content:center; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:rgba(255,255,255,.5) !important; font-size:11px !important; font-weight:500 !important; white-space:nowrap;}
  html.bphone .bf i{border-color:rgba(255,255,255,.45) !important; background:transparent !important;}
  html.bphone .bf.on{color:#fff !important; background:transparent !important; box-shadow:none !important;}
  html.bphone .bf.on i{border-color:#fff !important; background:#fff !important;}
  html.bphone .bswatches{gap:14px !important; padding:10px 16px 6px !important; align-items:center;}
  html.bphone .sw{flex:none; width:30px !important; height:30px !important; border-radius:0 !important; border:1px solid rgba(255,255,255,.22) !important;}
  html.bphone .sw.on{box-shadow:0 0 0 2px #0E0E10, 0 0 0 3px #fff !important;}
  html.bphone .sw.auto{background:transparent !important;}
  /* Border: a label, a slider and its number on one line */
  html.bphone .bgroup[data-m="border"]{display:none;}
  html.bphone .bpanel[data-m="border"] > .bgroup[data-m="border"]{display:grid !important; grid-template-columns:156px minmax(0,1fr); align-items:center; column-gap:16px;}
  html.bphone .bgroup[data-m="border"] .bg-h{height:44px; display:flex !important; align-items:center; gap:0; white-space:nowrap;}
  html.bphone .bgroup[data-m="border"] .bg-h:not(:has(output)){display:none !important;}
  html.bphone .bgroup[data-m="border"] .bg-h output, html.bphone .bgroup[data-m="file"] .bg-h output{margin-left:auto; padding-left:14px;}
  html.bphone .bgroup[data-m="border"] input[type=range]{width:100%; height:44px; margin:0 !important; background:transparent;}
  html.bphone .bgroup[data-m="border"] .bcheck{grid-column:1 / -1; order:9; height:44px; font-size:14px !important; font-weight:500 !important; color:rgba(255,255,255,.76) !important;}
  html.bphone .bgroup[data-m="border"] .blink{grid-column:1 / -1; justify-self:start; height:44px; font-size:14px !important; color:rgba(255,255,255,.55) !important; text-decoration:none !important;}
  /* Caption */
  html.bphone .bgroup[data-m="text"] .bg-h{display:none !important;}
  html.bphone .bin{height:48px !important; padding:0 !important; border:0 !important; border-bottom:1px solid rgba(255,255,255,.22) !important; border-radius:0 !important; background:transparent !important; color:#fff !important; font-size:16px !important;}
  html.bphone .bin:focus{border-bottom-color:#fff !important;}
  /* choices: words on a line, the chosen one white with a hairline under it */
  html.bphone .bseg{display:flex !important; gap:0 !important; margin:4px -10px 0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important;}
  html.bphone .bseg button{flex:none !important; min-height:44px !important; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.5) !important; font-size:14px !important; font-weight:500 !important;}
  html.bphone .bseg button.on{background:transparent !important; color:#fff !important; font-weight:500 !important; box-shadow:inset 0 -1px 0 #fff !important;}
  /* File */
  html.bphone .bgroup[data-m="file"] .bg-h:first-child{display:none !important;}
  html.bphone .bgroup[data-m="file"] .bg-h{height:44px; display:inline-flex !important; align-items:center; width:104px; gap:0; vertical-align:middle; margin-top:0 !important;}
  html.bphone .bgroup[data-m="file"] input[type=range]{width:calc(100% - 132px); height:44px; margin:0 0 0 16px !important; vertical-align:middle;}
  html.bphone #bExportGo #exportBtn2{display:none !important;}
  html.bphone .bmore{display:none;}
  html.bphone .bapp.many .bmore{display:flex; gap:24px;}
  html.bphone .bmore .blink{height:44px; font-size:14px !important; color:rgba(255,255,255,.55) !important; text-decoration:none !important;}
  /* the finished files */
  html.bphone .bout{padding:0 16px !important;}
  html.bphone .bout-h{display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px;}
  html.bphone .bout-h b{font-size:15px; font-weight:600; color:#fff;}
  html.bphone .bout-h span{display:none;}
  html.bphone #cancelBtn, html.bphone #dlfolder{display:none !important;}
  html.bphone .bapp:not(.many) #dlzip{display:none !important;}
  html.bphone .bout .bbtn{height:40px !important; padding:0 16px !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:#fff !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.3) !important; font-size:14px !important;}
  html.bphone .bout .bbtn.solid{background:#DFFF3F !important; color:#17171A !important; box-shadow:none !important;}
  html.bphone .bout .bbtn:disabled{opacity:.4 !important;}
  html.bphone .bprog{margin-top:4px; border-radius:0 !important;}
  html.bphone .bout:has(#dlall:not(:disabled)) .bprog{visibility:hidden;}
  html.bphone .bcheck input{appearance:none; -webkit-appearance:none; width:18px !important; height:18px !important; border:1px solid rgba(255,255,255,.42); border-radius:0; background:transparent;}
  html.bphone .bcheck input:checked{background:#fff; border-color:#fff;}
  html.bphone .rz-out, html.bphone #bOutEnd, html.bphone .bout > .tnext, html.bphone .bout > .krate, html.bphone .bout > #ratebox, html.bphone .bout > div:has(#ratebox){display:none !important;}
}

/* ---- phone first: Resize and Remove metadata (html.kp, set in mobile.js) ----
   The same screen as White border: the photo, one set of controls, a bar at the thumb, one action top right. */
@media (max-width:767px){
  html.kp .kapp{display:flex !important; flex-direction:column; background:#0E0E10 !important;}
  html.kp .kapp::after{display:none !important;}
  /* the top */
  html.kp .kapp-strip{order:1; flex:none; display:flex !important; align-items:center; justify-content:flex-start !important; height:52px !important; min-height:52px !important; padding:0 12px 0 4px !important; overflow:visible !important; background:#0E0E10 !important; border:0 !important;}
  html.kp .kapp-strip > .sp{display:block !important; flex:1 1 auto;}
  html.kp .kapp-strip #addMore{order:-1; position:relative !important; left:auto !important; bottom:auto !important; display:inline-flex !important; width:44px !important; height:44px !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.76) !important; font-size:0 !important;}
  html.kp .kapp-strip #addMore::before, html.kp .kapp-strip #addMore::after{content:""; position:absolute; left:50%; top:50%; background:currentColor;}
  html.kp .kapp-strip #addMore::before{width:17px; height:1.7px; margin:-.85px 0 0 -8.5px;}
  html.kp .kapp-strip #addMore::after{width:1.7px; height:17px; margin:-8.5px 0 0 -.85px;}
  html.kp .kapp-strip #addMore:active{color:#fff !important;}
  html.kp .kapp-strip #zipBtn{position:static !important; left:auto !important; right:auto !important; bottom:auto !important; width:auto !important; height:36px !important; padding:0 18px !important; border:0 !important; border-radius:0 !important; background:#DFFF3F !important; color:#17171A !important; font-size:14px !important; font-weight:600 !important;}
  html.kp .kapp-strip #zipBtn:disabled{background:transparent !important; color:rgba(255,255,255,.35) !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.16) !important;}
  /* the photo */
  html.kp .kapp-main{order:2; flex:1 1 auto; min-height:0; display:flex !important; flex-direction:column;}
  html.kp .kapp-insp{order:1; flex:1 1 auto; min-height:0; display:flex !important; flex-direction:column; background:#0E0E10 !important;}
  html.kp .kapp-insp-top{display:none !important;}
  html.kp .kapp-stage{flex:1 1 auto; min-height:0; overflow:hidden; padding:4px 16px 10px !important; background:#0E0E10 !important;}
  html.kp .kapp-stage:not(.doc) .kapp-media{display:flex; align-items:center; justify-content:center; width:100%; height:100%;}
  html.kp .kapp-stage:not(.doc) .kapp-media[hidden]{display:none;}
  html.kp .kapp-stage:not(.doc) .kapp-media img, html.kp .kapp-stage:not(.doc) .kapp-media canvas{max-width:100% !important; max-height:100% !important; width:auto; height:auto; object-fit:contain;}
  html.kp .kapp-media .tag{display:none !important;}
  html.kp .kapp-stage.doc{overflow:auto; padding:8px 16px !important;}
  /* what came out, in one line */
  html.kp .kapp-det{flex:none; display:flex !important; flex-wrap:wrap; gap:2px 20px; min-height:0 !important; padding:0 16px 10px !important; border:0 !important; background:transparent !important;}
  html.kp .kapp-det > div:not(.acts){display:flex; align-items:baseline; gap:8px;}
  html.kp .kapp-det .k{font-size:13px !important; font-weight:500 !important; letter-spacing:0 !important; text-transform:none !important; color:rgba(255,255,255,.5) !important;}
  html.kp .kapp-det .v{margin:0 !important; font-size:13px !important; color:#fff !important;}
  html.kp .kapp-det .v small{font-size:13px !important; color:rgba(255,255,255,.5) !important;}
  html.kp .kapp-det .acts{flex:1 0 100%; margin:0 !important; gap:0 !important;}
  html.kp .kapp-det .acts [data-act="dl"], html.kp .kapp-det .acts [data-act="rm"]{display:none !important;}
  html.kp .kapp-det .acts .lbl{display:none !important;}
  html.kp .kapp-det .acts .seg{display:flex !important; margin:0 -10px !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; overflow-x:auto; scrollbar-width:none;}
  html.kp .kapp-det .acts .seg button{flex:none; height:40px !important; padding:0 10px !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.5) !important; font-size:13px !important; white-space:nowrap;}
  html.kp .kapp-det .acts .seg button.on{color:#fff !important; background:transparent !important; box-shadow:inset 0 -1px 0 #fff !important;}
  /* the other photos, only when there are any */
  html.kp .kapp-queue{order:2; flex:none; display:block !important; border:0 !important; background:transparent !important;}
  html.kp .kapp-queue:not(:has(.kapp-row + .kapp-row)){display:none !important;}
  html.kp .kapp-qh{display:none !important;}
  html.kp .kapp-list{display:flex !important; gap:0; max-height:none; padding:0 6px 6px !important; overflow-x:auto; overflow-y:hidden; scrollbar-width:none;}
  html.kp .kapp-list::-webkit-scrollbar{display:none;}
  html.kp .kapp-row{flex:none; max-width:46%; margin:0 !important; padding:0 10px !important; height:40px; display:flex !important; align-items:center; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; animation:none !important;}
  html.kp .kapp-row > :not(.fn){display:none !important;}
  html.kp .kapp-row .fn{font-size:13px !important; font-weight:500 !important; color:rgba(255,255,255,.5) !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  html.kp .kapp-row.sel .fn{color:#fff !important;}
  html.kp .kapp-row.sel{box-shadow:inset 0 -1px 0 #fff !important;}
  /* the controls */
  html.kp .kapp-tools{order:3; flex:none; display:flex !important; flex-direction:column; justify-content:flex-end; min-height:0; margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; overflow:visible;}
  html.kp .kapp-sum{order:-1 !important; padding:0 16px 8px !important; border:0 !important;}
  html.kp .kapp-sum b{font-size:13px !important; font-weight:500 !important; letter-spacing:0 !important; color:#fff !important;}
  html.kp .kapp-sum span{font-size:13px !important; color:rgba(255,255,255,.5) !important;}
  html.kp .kapp-tools[data-m] .kapp-opt{display:none !important;}
  html.kp .kapp-tools[data-m="Size"] .kapp-opt[data-m="Size"], html.kp .kapp-tools[data-m="Crop"] .kapp-opt[data-m="Crop"], html.kp .kapp-tools[data-m="File"] .kapp-opt[data-m="File"]{display:flex !important;}
  html.kp .kapp-tools[data-m]{min-height:176px;}
  html.kp .kapp-opt{min-height:44px !important; padding:0 16px !important; gap:16px !important; flex-wrap:nowrap !important;}
  html.kp .kapp-opt::before{display:none !important;}
  html.kp .kapp-opt .fl, html.kp .kapp-opt > label:not(.chk){flex:0 0 72px !important; font-size:13px !important; font-weight:500 !important; color:rgba(255,255,255,.55) !important;}
  html.kp .kapp-opt[data-m="Size"] .fl{display:none !important;}
  html.kp .kapp-opt .range{flex:1 1 auto; display:flex; align-items:center; gap:12px;}
  html.kp .kapp-opt .range input{flex:1 1 auto; width:auto; height:44px; margin:0;}
  html.kp .kapp-opt .range output{color:#fff; font-size:13px; font-variant-numeric:tabular-nums;}
  /* choices: words, the chosen one white with a hairline under it */
  html.kp .kapp-opt .seg, html.kp .kapp-opt .chips{display:flex !important; gap:0 !important; margin:0 -10px !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important;}
  html.kp .kapp-opt .seg button, html.kp .kapp .chips button{flex:none; height:44px !important; min-height:44px; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:rgba(255,255,255,.5) !important; font-size:14px !important; font-weight:500 !important;}
  html.kp .kapp-opt .seg button.on, html.kp .kapp .chips button.on{background:transparent !important; color:#fff !important; box-shadow:inset 0 -1px 0 #fff !important;}
  /* sizes: a list, name on the left and pixels on the right, several can be on */
  html.kp .kapp-opt[data-m="Size"]{align-items:stretch !important; padding:0 !important;}
  html.kp .kapp-opt[data-m="Size"] .chips{flex:1 1 auto; flex-direction:column; margin:0 !important; max-height:176px; overflow-y:auto; overflow-x:hidden; scrollbar-width:none;}
  html.kp .kapp-opt[data-m="Size"] .chips::-webkit-scrollbar{display:none;}
  html.kp .kapp-opt[data-m="Size"] .chips button{display:flex !important; align-items:center; justify-content:space-between; width:100%; padding:0 16px !important; text-align:left; box-shadow:none !important;}
  html.kp .kapp-opt[data-m="Size"] .chips button span{color:rgba(255,255,255,.35) !important; font-size:13px; font-variant-numeric:tabular-nums;}
  html.kp .kapp-opt[data-m="Size"] .chips button.on span{color:rgba(255,255,255,.7) !important;}
  html.kp .kapp-opt[data-m="Size"] .chips button.on{box-shadow:inset 2px 0 0 #fff !important;}
  /* yes or no: a line of words and a square box */
  html.kp .kapp-opt label.chk{min-height:44px; font-size:14px !important; font-weight:500 !important; color:rgba(255,255,255,.76) !important; flex-direction:row !important; justify-content:flex-start !important; gap:12px !important;}
  html.kp .kapp-opt input[type=checkbox]{width:18px !important; height:18px !important; border-radius:0 !important; border:1px solid rgba(255,255,255,.42); background:transparent !important;}
  html.kp .kapp-opt input[type=checkbox]::after{display:none !important;}
  html.kp .kapp-opt input[type=checkbox]:checked{background:#fff !important; border-color:#fff;}
  /* the bar at the thumb */
  html.kp .kmodes{order:9; flex:none; display:flex; margin-top:12px; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid rgba(255,255,255,.09);}
  html.kp .kmodes[hidden]{display:block !important; border:0; margin:0; height:calc(12px + env(safe-area-inset-bottom));}
  html.kp .kmodes button{position:relative; flex:1 1 0; min-width:0; height:50px; padding:0; border:0; border-radius:0; background:transparent; color:rgba(255,255,255,.5); font-family:inherit; font-size:14px; font-weight:500; -webkit-tap-highlight-color:transparent; transition:color .14s ease;}
  html.kp .kmodes button.on{color:#fff;}
  html.kp .kmodes button.on::after{content:""; position:absolute; left:0; right:0; top:-1px; height:1px; background:#fff;}
  html.kp .mopt{display:none !important;}
  /* one line says what came out: the photo's own facts in Resize, the total in Remove metadata */
  html.kp-social-media-image-resizer .kapp-sum{display:none !important;}
  html.kp-remove-exif .kapp-det{display:none !important;}
  html.kp-remove-exif .kapp-sum{padding:0 16px 4px !important;}
}
@media (max-width:767px){
  /* Remove metadata: the clean photo, then what was in it and what is gone */
  html.kp .mr-view{display:block !important;}
  html.kp .mr-pic{margin:0 0 14px !important; display:flex; justify-content:center; height:38vh; height:38dvh; max-height:340px;}
  html.kp .mr-pic img{max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important; object-fit:contain; border:0 !important;}
  html.kp .mr-pic figcaption{display:none !important;}
  html.kp .kapp-rep h3{margin:14px 0 2px !important; font-size:13px !important; font-weight:500 !important; color:rgba(255,255,255,.5) !important;}
  html.kp .kapp-rep table{font-size:14px !important;}
  html.kp .kapp-rep td{padding:9px 0 !important; border-top:1px solid rgba(255,255,255,.08) !important;}
  html.kp .kapp-rep .note{font-size:13px !important;}
}
@media (max-width:767px){
  html.kp .kapp-stage.doc .kapp-media{display:block !important; width:100%;}
  html.kp .kapp-opt input[type=checkbox]:checked, html.bphone .bcheck input:checked{background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3.2 3.2L14 5.8' fill='none' stroke='%230E0E10' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat !important;}
}

/* ---- phone first: Text behind photo (html.tphone, set in the tool) ---- */
@media (max-width:767px){
  html.tphone .tbed{gap:0 !important; background:#0E0E10 !important;}
  /* the top: a new photo on the left, undo and redo, the one action on the right */
  html.tphone .tbtop{flex:none; height:52px !important; padding:0 12px 0 4px !important; gap:0 !important; background:#0E0E10 !important; border:0 !important; justify-content:flex-start !important;}
  html.tphone .tbtop-l{display:none !important;}
  html.tphone .tbtop-r{width:100%; display:flex; align-items:center; gap:0 !important; justify-content:flex-start !important;}
  html.tphone .tbtop-home, html.tphone .tbtop-t, html.tphone .tbtop-bar, html.tphone #tbClose, html.tphone #tbShare{display:none !important;}
  html.tphone .tbicon, html.tphone .tbtop-new{width:44px !important; height:44px !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:rgba(255,255,255,.76) !important; justify-content:center;}
  html.tphone .tbicon svg, html.tphone .tbtop-new svg{width:20px; height:20px; stroke-width:1.7;}
  html.tphone .tbicon:disabled{color:rgba(255,255,255,.25) !important; opacity:1 !important;}
  html.tphone .tbicon:not(:disabled):active, html.tphone .tbtop-new:active{color:#fff !important;}
  html.tphone .tbtop-new{order:-1;}
  html.tphone .tbtop-new span{display:none !important;}
  html.tphone .tbtop-save{margin-left:auto !important; height:36px !important; padding:0 18px !important; border:0 !important; border-radius:0 !important; background:#DFFF3F !important; color:#17171A !important; font-size:14px !important; font-weight:600 !important;}
  /* the photo */
  html.tphone .tbmain{flex:1 1 auto; min-height:0; display:flex; flex-direction:column;}
  html.tphone .tbstage{flex:1 1 auto; min-height:0; background:#0E0E10 !important; background-image:none !important;}
  html.tphone .tbstage canvas{max-width:calc(100% - 32px) !important; max-height:calc(100% - 16px) !important; box-shadow:none !important;}
  /* the controls: one set at a time */
  html.tphone .tbpanel{flex:none !important; width:100% !important; max-height:52% !important; min-height:238px; display:flex !important; flex-direction:column; justify-content:flex-end; overflow:visible !important; border:0 !important; background:#0E0E10 !important;}
  html.tphone .tbsec, html.tphone .tbsecb, html.tphone .tbrow{display:contents !important;}
  html.tphone .tbsech{display:none !important;}
  html.tphone .tbpanel [data-m]:not(button){display:none !important;}
  html.tphone .tbpanel[data-m="words"] [data-m="words"]:not(button), html.tphone .tbpanel[data-m="style"] [data-m="style"]:not(button), html.tphone .tbpanel[data-m="font"] [data-m="font"]:not(button), html.tphone .tbpanel[data-m="space"] [data-m="space"]:not(button), html.tphone .tbpanel[data-m="look"] [data-m="look"]:not(button), html.tphone .tbpanel[data-m="cutout"] [data-m="cutout"]:not(button){display:grid !important;}
  html.tphone .tbpanel [data-m][hidden]:not(button){display:none !important;}
  html.tphone .tbmodes{order:99; flex:none; display:flex; margin-top:12px; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid rgba(255,255,255,.09);}
  html.tphone .tbmodes button{position:relative; flex:1 1 0; min-width:0; height:50px; padding:0; border:0; border-radius:0; background:transparent; color:rgba(255,255,255,.5); font-family:inherit; font-size:14px; font-weight:500; letter-spacing:0; -webkit-tap-highlight-color:transparent; transition:color .14s ease;}
  html.tphone .tbmodes button.on{color:#fff;}
  html.tphone .tbmodes button.on::after{content:""; position:absolute; left:0; right:0; top:-1px; height:1px; background:#fff;}
  /* a row: a label and its number, then the control */
  html.tphone .tbf{grid-template-columns:132px minmax(0,1fr); align-items:center; column-gap:16px; margin:0 !important; padding:0 16px; min-height:44px; border-radius:0 !important;}
  html.tphone .tblab{margin:0 !important; font-size:13px !important; font-weight:500 !important; letter-spacing:0 !important; text-transform:none !important; color:rgba(255,255,255,.55) !important;}
  html.tphone .tblab b{padding:0 !important; background:transparent !important; color:#fff !important; font-weight:500 !important;}
  html.tphone .tbrng{height:44px !important; margin:0 !important;}
  html.tphone .tbhint{display:none !important;}
  /* Words */
  html.tphone .tbf[data-m="words"]{grid-template-columns:1fr;}
  html.tphone .tbf[data-m="words"] .tblab{display:none !important;}
  html.tphone .tbin{height:48px !important; min-height:48px; padding:12px 0 !important; border:0 !important; border-bottom:1px solid rgba(255,255,255,.22) !important; border-radius:0 !important; background:transparent !important; color:#fff !important; font-size:16px !important; line-height:1.4; resize:none;}
  html.tphone .tbin:focus{border-bottom-color:#fff !important; outline:none;}
  html.tphone .tbf[data-m="words"]{order:-3;}
  html.tphone .tblayers[data-m="words"]{order:-2; grid-auto-flow:column; grid-auto-columns:max-content; gap:0 !important; margin:4px 0 0 !important; padding:0 6px; overflow-x:auto; scrollbar-width:none;}
  html.tphone .tblayers::-webkit-scrollbar{display:none;}
  html.tphone .tblayer{width:auto !important; max-width:44vw; height:44px; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.5) !important; font-size:14px !important;}
  html.tphone .tblayer.on{color:#fff !important; background:transparent !important; box-shadow:inset 0 -1px 0 #fff !important;}
  html.tphone .tbaddrow[data-m="words"]{order:-1; display:none !important;}
  html.tphone .tbpanel[data-m="words"] .tbaddrow[data-m="words"]{display:flex !important; gap:24px !important; margin:0 !important; padding:0 16px;}
  html.tphone .tbadd{flex:none !important; width:auto !important; height:44px !important; margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.55) !important; font-size:14px !important;}
  html.tphone .tbadd:active{color:#fff !important;}
  /* Style: looks on one line that slides, colors under it */
  html.tphone .tbf[data-m="style"]{grid-template-columns:1fr; padding:0;}
  html.tphone .tbf[data-m="style"] .tblab{display:none !important;}
  html.tphone .tbpresets{display:flex !important; flex-wrap:nowrap !important; gap:0 !important; margin:0 !important; padding:0 6px; overflow-x:auto; scrollbar-width:none;}
  html.tphone .tbpresets::-webkit-scrollbar, html.tphone .tbsw::-webkit-scrollbar{display:none;}
  html.tphone .tbpresets button, html.tphone .tbpre{flex:none; height:44px !important; min-height:44px; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:rgba(255,255,255,.55) !important; font-size:14px !important; font-weight:500 !important; white-space:nowrap;}
  html.tphone .tbpresets button.on, html.tphone .tbpre.on{background:transparent !important; color:#fff !important; box-shadow:inset 0 -1px 0 #fff !important;}
  html.tphone .tbsw{display:flex !important; flex-wrap:nowrap !important; gap:14px !important; margin:0 !important; padding:10px 16px 4px; overflow-x:auto; scrollbar-width:none; align-items:center;}
  html.tphone .tbsw button{flex:none; width:30px !important; height:30px !important; border:1px solid rgba(255,255,255,.22) !important;}
  html.tphone .tbsw button.on{box-shadow:0 0 0 2px #0E0E10, 0 0 0 3px #fff !important;}
  html.tphone .tbf[data-m="style"]:has(.tbsw){grid-template-columns:minmax(0,1fr) auto; column-gap:0;}
  html.tphone .tbf[data-m="style"] .tbcol{width:30px !important; height:30px !important; margin:6px 16px 0 14px !important; padding:0 !important; border:1px solid rgba(255,255,255,.22) !important; border-radius:0 !important; background:transparent !important;}
  html.tphone .tbpanel .tbhint[data-m]{display:none !important;}
  html.tphone .tbpanel .tblayers[data-m]:not(:has(.tblayer + .tblayer)){display:none !important;}
  /* choices */
  html.tphone .tbseg{display:flex !important; gap:0 !important; margin:0 -10px !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important;}
  html.tphone .tbseg button{flex:none !important; height:44px !important; min-width:44px; padding:0 10px !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.5) !important; font-size:14px !important;}
  html.tphone .tbseg button.on{background:transparent !important; color:#fff !important; box-shadow:inset 0 -1px 0 #fff !important;}
  html.tphone .tbfontbtn{height:44px !important; margin:0 !important; padding:0 !important; border:0 !important; border-bottom:1px solid rgba(255,255,255,.22) !important; border-radius:0 !important; background:transparent !important; color:#fff !important; font-size:15px !important;}
  html.tphone .tbfontmenu{grid-column:1 / -1; max-height:200px !important; margin:0 !important; border:0 !important; border-bottom:1px solid rgba(255,255,255,.12) !important; background:transparent !important;}
  html.tphone select.tbsel{height:44px !important; margin:0 !important; padding:0 !important; border:0 !important; border-bottom:1px solid rgba(255,255,255,.22) !important; border-radius:0 !important; background-color:transparent !important; color:#fff !important; font-size:15px !important;}
  html.tphone .tbf[data-m="look"] .tbcol{height:32px !important; margin:0 !important; padding:0 !important; border:1px solid rgba(255,255,255,.22) !important; border-radius:0 !important; background:transparent !important;}
}
@media (max-width:767px){
  html.tphone .tbf:has(> .tbseg){grid-template-columns:max-content minmax(0,1fr);}
}
@media (max-width:767px){
  html.tphone .tbpanel[data-m] .tbhint[data-m]:not(button){display:none !important;}
  html.tphone .tbsw{gap:10px !important;}
  html.kp-social-media-image-resizer .kapp-det > div:not(.acts):not(:first-child) .k{display:none !important;}
  html.kp .kmore{display:none; order:8; align-self:flex-start; height:44px; margin:0 16px; padding:0; border:0; background:transparent; color:rgba(255,255,255,.55); font-family:inherit; font-size:14px; font-weight:500;}
  html.kp .kapp:has(.kapp-row + .kapp-row) .kapp-tools:not([data-m]) .kmore, html.kp .kapp:has(.kapp-row + .kapp-row) .kapp-tools[data-m="File"] .kmore{display:block;}
  html.kp .kmore:active{color:#fff;}
}

/* ---- every screen: lime is the one action, a choice is white ----
   The tools marked what is chosen in lime, next to a lime action. A chosen size, a selected file,
   a switch that is on and a picked color are white now, as in the gallery. */
@media (min-width:768px){
  .kapp .chips button.on, .bpresets button.on, .tbpresets button.on, .tbpre.on{background:#F4F4F2 !important; color:#17171A !important; border-color:#F4F4F2 !important; box-shadow:none !important;}
  .kapp .chips button.on span{color:rgba(23,23,26,.6) !important;}
  .bf.on{background:rgba(255,255,255,.06) !important; box-shadow:inset 0 0 0 1.5px #F4F4F2 !important;}
  .kapp-row.sel{box-shadow:inset 0 0 0 1px rgba(255,255,255,.7) !important; border-color:rgba(255,255,255,.7) !important;}
  .tblayer.on{border-color:rgba(255,255,255,.7) !important; background:rgba(255,255,255,.06) !important;}
  .tbsw button.on{box-shadow:0 0 0 2px #17171A, 0 0 0 3.5px #fff !important;}
  .kapp-opt input[type=checkbox]:checked, .ws-set input[type=checkbox]:checked{background:#F4F4F2 !important;}
  .kapp-opt input[type=checkbox]:checked::after, .ws-set input[type=checkbox]:checked::after{background:#17171A !important;}
}
@media (min-width:768px){
  .kapp-track i{background:#F4F4F2 !important;}
}
@media (max-width:767px){
  /* no photo in: only the way to add one */
  html.bphone .bapp-in:has(#bEmpty:not([hidden])) .bpanel{display:none !important;}
  html.bphone .bempty{border:0 !important; background:transparent !important;}
  html.bphone .bempty-i{display:none !important;}
  html.bphone .bempty b{font-size:17px; font-weight:600; color:#fff;}
  html.bphone .bempty span{font-size:14px; color:rgba(255,255,255,.5); max-width:28ch; text-align:center;}
  html.bphone .bempty::after{border-radius:0 !important; height:44px !important; font-size:15px !important;}
}

/* ---- phone: a choice shows its result ---- */
@media (max-width:767px){
  /* White border: each preset is the photo in that frame */
  html.bphone .bpresets{align-items:flex-end; padding:0 8px !important;}
  html.bphone .bpresets button.mini{display:flex !important; flex-direction:column; align-items:center; justify-content:flex-end; gap:7px; height:92px !important; padding:0 8px 9px !important;}
  html.bphone .bpresets button.mini canvas{display:block; height:54px; width:auto; max-width:76px; opacity:.72; transition:opacity .14s ease;}
  html.bphone .bpresets button.mini span{font-size:11.5px; line-height:1;}
  html.bphone .bpresets button.mini.on canvas, html.bphone .bpresets button.mini:active canvas{opacity:1;}
  html.bphone .bpanel{min-height:242px;}
  /* Resize: each size shows its shape */
  html.kp .kapp-opt[data-m="Size"] .chips button{justify-content:flex-start !important; gap:14px;}
  html.kp .kapp-opt[data-m="Size"] .chips button i.shape{flex:none; width:20px; height:20px; display:grid; place-items:center;}
  html.kp .kapp-opt[data-m="Size"] .chips button i.shape u{display:block; box-sizing:border-box; border:1px solid rgba(255,255,255,.45); text-decoration:none;}
  html.kp .kapp-opt[data-m="Size"] .chips button i.shape u.any{width:20px; height:14px; border-style:dashed;}
  html.kp .kapp-opt[data-m="Size"] .chips button.on i.shape u{border-color:#fff; background:#fff;}
  html.kp .kapp-opt[data-m="Size"] .chips button span{margin-left:auto !important;}
  /* one slider everywhere: a hairline and a thumb a finger can find */
  html.bphone .bapp input[type=range], html.tphone .tbrng, html.kp .kapp-opt .range input{-webkit-appearance:none; appearance:none; background:transparent !important;}
  html.bphone .bapp input[type=range]::-webkit-slider-runnable-track, html.tphone .tbrng::-webkit-slider-runnable-track, html.kp .kapp-opt .range input::-webkit-slider-runnable-track{height:2px; background:rgba(255,255,255,.22); border:0; border-radius:0;}
  html.bphone .bapp input[type=range]::-webkit-slider-thumb, html.tphone .tbrng::-webkit-slider-thumb, html.kp .kapp-opt .range input::-webkit-slider-thumb{-webkit-appearance:none; appearance:none; width:22px; height:22px; margin-top:-10px; border:0; border-radius:50%; background:#fff; box-shadow:0 0 0 4px #0E0E10;}
  html.bphone .bapp input[type=range]::-moz-range-track, html.tphone .tbrng::-moz-range-track, html.kp .kapp-opt .range input::-moz-range-track{height:2px; background:rgba(255,255,255,.22);}
  html.bphone .bapp input[type=range]::-moz-range-thumb, html.tphone .tbrng::-moz-range-thumb, html.kp .kapp-opt .range input::-moz-range-thumb{width:22px; height:22px; border:0; border-radius:50%; background:#fff;}
  /* a new set arrives, it does not blink in */
  @media (prefers-reduced-motion:no-preference){
    @keyframes kset{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}
    html.bphone .bpanel > .bgroup, html.bphone .bpanel > .bout, html.kp .kapp-tools[data-m] .kapp-opt, html.tphone .tbpanel [data-m]:not(button){animation:kset .18s cubic-bezier(.2,.7,.2,1) both;}
    html.bphone .bmodes button:active, html.kp .kmodes button:active, html.tphone .tbmodes button:active{color:#fff;}
  }
}

/* ---- phone: it behaves like an app ---- */
@media (max-width:767px){
  /* nothing a web page does by accident: no grey flash on a tap, no text picked up by a long press, no zoom on a double tap, no page bounce behind the tool */
  html.bphone, html.kp, html.tphone, html.bphone body, html.kp body, html.tphone body{overscroll-behavior:none;}
  html.bphone .bapp, html.kp .kapp, html.tphone .tbed{-webkit-tap-highlight-color:transparent; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; touch-action:manipulation;}
  html.bphone .bapp input[type=text], html.tphone .tbed textarea, html.tphone .tbed input[type=text]{-webkit-user-select:text; user-select:text;}
  html.bphone .bpresets, html.bphone .bframes, html.bphone .bswatches, html.bphone .bstrip, html.tphone .tbpresets, html.tphone .tbsw, html.tphone .tblayers, html.kp .kapp-list{overscroll-behavior-x:contain; touch-action:pan-x;}
  html.kp .kapp-opt[data-m="Size"] .chips{overscroll-behavior:contain; touch-action:pan-y;}
  /* the bar: one hairline that slides to the chosen set */
  html.bphone .bmodes.slide, html.kp .kmodes.slide, html.tphone .tbmodes.slide{position:relative;}
  html.bphone .bmodes.slide::before, html.kp .kmodes.slide::before, html.tphone .tbmodes.slide::before{content:""; position:absolute; left:0; top:-1px; width:calc(100% / var(--n, 4)); height:1px; background:#fff; transform:translateX(calc(var(--i, 0) * 100%)); transition:transform .26s cubic-bezier(.2,.7,.2,1);}
  html.bphone .bmodes.slide button.on::after, html.kp .kmodes.slide button.on::after, html.tphone .tbmodes.slide button.on::after{display:none;}
  @media (prefers-reduced-motion:reduce){ html.bphone .bmodes.slide::before, html.kp .kmodes.slide::before, html.tphone .tbmodes.slide::before{transition:none;} }
  /* a press answers at once */
  html.bphone .bpresets button, html.bphone .bf, html.bphone .sw, html.bphone .bth, html.tphone .tbpre, html.tphone .tbsw button, html.kp .kapp .chips button, html.kp .kapp-row{transition:opacity .12s ease, color .12s ease, transform .12s ease !important;}
  html.bphone .bf:active, html.bphone .sw:active, html.bphone .bth:active, html.tphone .tbsw button:active{transform:scale(.94);}
  html.bphone .btop #exportBtn:active, html.kp .kapp-strip #zipBtn:active, html.tphone .tbtop-save:active, html.bphone .bout .bbtn.solid:active{transform:scale(.97); background:#EAFF7A !important;}
  html.bphone .btop #exportBtn, html.kp .kapp-strip #zipBtn, html.tphone .tbtop-save{transition:transform .12s ease, background-color .12s ease !important;}
  /* Text behind photo: each quick style is drawn in its own face */
  html.tphone .tbpresets{align-items:flex-end; padding:0 8px !important;}
  html.tphone .tbpre.mini{display:flex !important; flex-direction:column; align-items:center; justify-content:flex-end; gap:6px; min-width:58px; height:74px !important; padding:0 8px 9px !important; box-shadow:none !important;}
  html.tphone .tbpre.mini .aa{font-size:28px; line-height:34px; letter-spacing:0;}
  html.tphone .tbpre.mini span{font-size:11.5px; line-height:1;}
  html.tphone .tbpre.mini.on{box-shadow:inset 0 -1px 0 #fff !important;}
  /* the keyboard is up: the tool is the part of the screen above it, and the bar steps aside */
  html.kkeys.bphone .bapp:not([hidden]), html.kkeys.tphone .tbed, html.kkeys.kp .kapp{top:0 !important; bottom:auto !important; height:var(--kvh) !important;}
  html.kkeys .bmodes, html.kkeys .tbmodes, html.kkeys .kmodes{display:none !important;}
  html.kkeys.bphone .bpanel, html.kkeys.tphone .tbpanel{min-height:0 !important; padding-bottom:10px;}
}
@media (max-width:767px){
  html.bphone .bpresets button.mini{flex:none !important;}
}
/* ---- wider screens: the same ease ---- */
@media (min-width:768px){
  /* a preset that is a picture is marked with a line around it, so its white frame still reads */
  .bpresets button.mini{border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.7) !important; border:1px solid rgba(255,255,255,.14) !important;}
  .bpresets button.mini:hover{border-color:rgba(255,255,255,.4) !important; color:#fff !important;}
  .bpresets button.mini.on{background:rgba(255,255,255,.06) !important; color:#fff !important; border-color:#F4F4F2 !important; box-shadow:inset 0 0 0 .5px #F4F4F2 !important;}
  .tbpre.mini{border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.7) !important; border:1px solid rgba(255,255,255,.14) !important;}
  .tbpre.mini:hover{border-color:rgba(255,255,255,.4) !important; color:#fff !important;}
  .tbpre.mini.on{background:rgba(255,255,255,.06) !important; color:#fff !important; border-color:#F4F4F2 !important;}
  /* one file in: the Download at the top is the Download. The second one beside the preview only repeats it. */
  .kapp:not(:has(.kapp-row + .kapp-row)) .kapp-det .acts [data-act="dl"]{display:none !important;}
}
/* opened from a client's gallery: Save to a folder and Send with Kepla are the sender's, not the guest's */
html.kgal #saveTo, html.kgal #sendKepla, html.kgal #dlfolder{display:none !important;}
/* tablets (768 to 1023 wide) had rounded buttons and pills while phones and computers are square: one language at every width */
@media (min-width:768px) and (max-width:1023px){
  .kapp .chips button, .kapp .seg, .kapp .seg button, .kapp-strip .btn-w, .kapp-strip .btn-o, .kapp-strip .btn-g, .kapp-x, .kapp-row, .kapp-tools, .kapp .chip, .kapp-det .btn-o, .kapp-det .btn-w,
  .bapp-in, .bbtn, .bpresets button, .bf, .bseg, .bseg button, .bin, .bth,
  .tbicon, .tbtop-save, .tbtop-new, .tbpre, .tbseg, .tbseg button, .tbadd, .tbin, .tbfontbtn, .tbfontmenu, select.tbsel, .tblayer{border-radius:0 !important;}
}
@media (min-width:768px) and (max-width:1023px){
  .bapp .bbtn.solid, .bapp .bbtn:not(.solid), .kapp .btn-g, .kapp .btn-o, .kapp .btn-w{border-radius:0 !important;}
}

/* ================= computers: one layout for every tool =================
   The photo in the middle. One panel on the right, 320 wide, with the same named sections as the phone,
   all open, in the same order. One action, top right. Other photos on the left, only when there are any.
   White border had tabs, Text behind photo had folding sections under other names, Resize and Remove
   metadata had their options in a strip across the top: three layouts for one job. */
@media (min-width:1024px){
  /* ---- a section: a hairline, a name, then its rows ---- */
  .bpanel > .bgroup:has(#bPresets)::before, .bpanel > .bgroup:has(#m)::before, .bpanel > .bgroup[data-m="text"]::before, .bpanel > .bgroup:has(#size)::before,
  .tbpanel .tbf[data-m="words"]::before, .tbpanel .tbf:has(#tbPresets)::before, .tbpanel .tbf:has(#tbFontBtn)::before, .tbpanel .tbf:has(#tbRot)::before, .tbpanel .tbf:has(#tbOp)::before, .tbpanel .tbf:has(#tbFeather)::before,
  html.kside .kapp-tools .kapp-opt.ksec::before, html.kside .kapp-tools .kapp-opt:first-of-type::before{display:block; margin:0 -20px 14px; padding:16px 20px 0; border-top:1px solid rgba(255,255,255,.08); color:#fff; font-family:inherit; font-size:13px; font-weight:600; letter-spacing:0; text-transform:none; line-height:1.2;}

  /* ---- White border ---- */
  .bbody{grid-template-columns:112px minmax(0,1fr) 320px !important;}
  .bapp:not(.many) .bbody{grid-template-columns:minmax(0,1fr) 320px !important;}
  .bapp:not(.many) .bstrip{display:none !important;}
  .btabs{display:none !important;}
  .bpanel{display:flex !important; flex-direction:column; overflow-y:auto; background:#141417 !important; border-left:1px solid rgba(255,255,255,.08) !important;}
  .bpanel > .bgroup{display:block !important; flex:none; padding:0 20px 16px !important; border:0 !important;}
  .bpanel > .bgroup:has(#bPresets){order:10;} .bpanel > .bgroup:has(#frames){order:11;} .bpanel > .bgroup:has(#colors){order:12;}
  .bpanel > .bgroup:has(#m){order:20;} .bpanel > .bgroup:has(#keyline){order:21;} .bpanel > .bgroup:has(#resetBtn){order:22;}
  .bpanel > .bgroup[data-m="text"]{order:30;} .bpanel > .bgroup:has(#size){order:40;} .bpanel > .bout{order:42;}
  .bpanel > #bExportGo{display:none !important;}
  .bpanel > .bout:not([hidden]){display:block !important;}
  .bpanel > .bgroup:has(#bPresets)::before{content:"Style"; border-top:0;}
  .bpanel > .bgroup:has(#m)::before{content:"Border";}
  .bpanel > .bgroup[data-m="text"]::before{content:"Caption";}
  .bpanel > .bgroup:has(#size)::before{content:"File";}
  .bpanel > .bgroup[data-m="text"] > .bg-h:first-of-type, .bpanel > .bgroup:has(#size) > .bg-h:first-of-type, .bpanel > .bgroup:has(#keyline) > .bg-h:first-of-type{display:none !important;}
  .btop #clearBtn{order:-1;}

  /* ---- Text behind photo ---- */
  .tbpanel{width:320px !important; box-sizing:border-box; display:flex !important; flex-direction:column; background:#141417 !important;}
  .tbpanel .tbsec, .tbpanel .tbsecb, .tbpanel .tbsec[data-off] .tbsecb, .tbpanel .tbrow{display:contents !important;}
  .tbpanel .tbsech{display:none !important;}
  .tbpanel [data-m]:not(button){display:block; flex:none; margin:0 !important; padding:0 20px 14px;}
  .tbpanel [data-m][hidden]:not(button){display:none !important;}
  .tbpanel .tbf[data-m="words"]{order:10;} .tbpanel .tblayers[data-m="words"]{order:11; display:flex;} .tbpanel .tbaddrow[data-m="words"]{order:12; display:flex !important; margin:0 !important;}
  .tbpanel [data-m="style"]{order:20;} .tbpanel [data-m="font"]{order:30;} .tbpanel [data-m="space"]{order:40;} .tbpanel [data-m="look"]{order:50;} .tbpanel [data-m="cutout"]{order:60;}
  .tbpanel .tbf[data-m="words"]::before{content:"Words"; border-top:0;}
  .tbpanel .tbf:has(#tbPresets)::before{content:"Style";}
  .tbpanel .tbf:has(#tbFontBtn)::before{content:"Font";}
  .tbpanel .tbf:has(#tbRot)::before{content:"Space";}
  .tbpanel .tbf:has(#tbOp)::before{content:"Look";}
  .tbpanel .tbf:has(#tbFeather)::before{content:"Cutout";}
  .tbpanel .tbf[data-m="words"] > .tblab, .tbpanel .tbf:has(#tbPresets) > .tblab{display:none !important;}
  .tbpanel .tblayers:not(:has(.tblayer + .tblayer)){display:none !important;}
  .tbpanel .tblab{font-size:12.5px !important; font-weight:500 !important; letter-spacing:0 !important; text-transform:none !important; color:rgba(255,255,255,.6) !important;}
  .tbpanel .tblab b{background:transparent !important; padding:0 !important;}

  /* ---- Resize and Remove metadata: the options leave the top strip for the same panel ---- */
  html.kside .kapp{grid-template-columns:minmax(0,1fr) 320px !important; grid-template-rows:auto minmax(0,1fr) auto !important;}
  html.kside .kapp-strip, html.kside .kapp-status{grid-column:1 / -1;}
  html.kside .kapp-main{grid-column:1; grid-row:2; grid-template-columns:240px minmax(0,1fr) !important;}
  html.kside .kapp-main:not(:has(.kapp-row + .kapp-row)){grid-template-columns:minmax(0,1fr) !important;}
  html.kside .kapp-main:not(:has(.kapp-row + .kapp-row)) .kapp-queue{display:none !important;}
  html.kside .kapp-tools{grid-column:2; grid-row:2; display:flex !important; flex-direction:column; flex-wrap:nowrap !important; align-items:stretch !important; gap:0 !important; min-height:0; margin:0 !important; padding:0 !important; overflow-y:auto; border:0 !important; border-left:1px solid rgba(255,255,255,.08) !important; border-radius:0 !important; background:#141417 !important;}
  html.kside .kapp-tools::before{display:none !important;}
  html.kside .kapp-tools > .sp{display:none !important;}
  html.kside .kapp-tools .kapp-opt{order:0 !important; flex:none !important; display:flex !important; flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 !important; padding:0 20px 12px !important; border:0 !important;}
  html.kside .kapp-tools .kapp-opt .fl, html.kside .kapp-tools .kapp-opt > label:not(.chk){flex:0 0 64px; font-size:12.5px !important; font-weight:500 !important; letter-spacing:0 !important; text-transform:none !important; color:rgba(255,255,255,.6) !important;}
  html.kside .kapp-tools .kapp-opt.ksec::before, html.kside .kapp-tools .kapp-opt:first-of-type::before{flex:1 0 100%; min-width:0; margin:0 -20px 6px !important; box-sizing:content-box; width:100%;}
  html.kside .kapp-tools .kapp-opt:first-of-type::before{border-top:0;}
  html.kside .kapp-tools .kapp-opt .range{flex:1 1 0;} html.kside .kapp-tools .kapp-opt .range input[type=range]{flex:1 1 0; width:auto;}
  html.kside .kapp-tools .kapp-opt .hint{display:block !important; flex:1 0 100%; max-width:none; margin-top:-4px;}
  html.kside .kapp-tools .kapp-sum{order:99 !important; margin-top:auto !important; padding:16px 20px !important; border-top:1px solid rgba(255,255,255,.08) !important; white-space:normal; flex-wrap:wrap;}
  /* Resize */
  html.kside .kapp-tools .rz-sizes .fl{display:none !important;}
  html.kside .kapp-tools .rz-sizes::before{content:"Size";}
  html.kside .kapp-tools .rz-sizes .chips{flex:1 0 100%; display:flex; flex-direction:column; gap:0; margin:0 -20px;}
  html.kside .kapp-tools .rz-sizes .chips button{display:flex !important; align-items:center; width:100%; height:36px !important; padding:0 20px !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:rgba(255,255,255,.62) !important; font-size:13px !important; font-weight:500 !important; text-align:left; box-shadow:none !important;}
  html.kside .kapp-tools .rz-sizes .chips button:hover{color:#fff !important; background:rgba(255,255,255,.04) !important;}
  html.kside .kapp-tools .rz-sizes .chips button.on{color:#fff !important; background:rgba(255,255,255,.07) !important; box-shadow:inset 2px 0 0 #F4F4F2 !important;}
  html.kside .kapp-tools .rz-sizes .chips button span{margin-left:auto !important; color:rgba(255,255,255,.4) !important; font-size:12px;}
  html.kside .kapp-tools .rz-sizes .chips button.on span{color:rgba(255,255,255,.7) !important;}
  html.kside .kapp-tools .kapp-opt:has(#fit)::before{content:"Crop" !important;}
  html.kside .kapp-tools .kapp-opt:has(#q)::before{content:"File" !important;}
  html.kside .kapp-tools .kapp-opt:has(#fit)::before, html.kside .kapp-tools .kapp-opt:has(#q)::before{display:block; flex:1 0 100%; margin:0 -20px 6px !important; padding:16px 20px 0; border-top:1px solid rgba(255,255,255,.08); color:#fff; font-size:13px; font-weight:600; min-width:0;}
  /* Remove metadata */
  html.kside .kapp-tools:not(:has(#sizes)) .kapp-opt:first-of-type::before{content:"Options";}
  html.kside .kapp-tools:not(:has(#sizes)) .kapp-opt .fl{display:none !important;}
}
@media (min-width:1024px){
  /* the top bar reads the same in every tool: what it is on the left, then add, then the action */
  .btop{gap:8px !important;} .btop .btop-l, .btop .btop-r{display:contents !important;}
  .btop .bcount{flex:1 1 auto; order:1;} .btop #addBtn{order:2;} .btop #clearBtn{order:3 !important;} .btop #exportOne{order:4;} .btop #exportBtn{order:5;} .btop .btop-bar{order:6;} .btop #bClose{order:7;}
}
@media (min-width:1024px){
  /* the "any color" well is a swatch like the others, not a bar across the panel */
  .tbpanel .tbf:has(> .tbsw){display:grid !important; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; align-items:end;}
  .tbpanel .tbf:has(> .tbsw) > .tblab, .tbpanel .tbf:has(> .tbsw)::before{grid-column:1 / -1;}
  .tbpanel .tbf:has(> .tbsw) > .tbcol{width:28px !important; height:28px !important; margin:0 !important; padding:0 !important;}
}
