.drop{
  border:1px solid var(--rule);background:var(--bg);
  padding:26px 16px;text-align:center;cursor:pointer;transition:border-color .18s,background .18s;
}
.drop:hover,.drop.over{border-color:var(--accent);background:#FBF8F3}
.drop strong{display:block;font-weight:400;margin-bottom:6px;letter-spacing:.04em}
.drop span{color:var(--muted);font-size:12px;font-weight:300}
/* Two sets of wording for the drop zone: a phone has no drag and drop and no ⌘V, but its
   file picker offers the camera.

   `pointer:coarse` alone, deliberately. This was `(hover:none) and (pointer:coarse)` and
   Android users reported getting the desktop wording — several Android browsers, Samsung
   Internet and the in-app webviews most of all, report `hover:hover`, which breaks the AND
   even though the pointer is reported correctly. `pointer` describes the *primary* input,
   so a touchscreen laptop with a mouse still reads `fine` and keeps the desktop wording,
   which is right: it can drag and paste. The width clause is a backstop for any device
   that gets `pointer` wrong too — a phone is narrow whatever it claims about itself. No
   min-height on that clause, unlike the layout queries: a phone held sideways is short and
   still a phone. The cost is that a narrow desktop window gets the touch wording, which is
   a far cheaper mistake than a phone being told to press ⌘V. */
.drop .touch{display:none}
@media (pointer:coarse), (max-width:820px){
  .drop .desk{display:none}
  .drop strong.touch{display:block}
  .drop span.touch{display:inline}
}
.filecard{display:none;align-items:center;gap:14px}
.filecard.on{display:flex}
.thumb{width:54px;height:54px;flex:0 0 54px;border:1px solid var(--rule);background:var(--swatch) center/cover no-repeat}
.fileinfo{min-width:0;flex:1}
/* name and size share one line, the size right-aligned against the far edge: it is short
   and fixed, so it keeps the width it needs and the name takes the rest, truncating
   rather than wrapping */
.fileline{display:flex;align-items:baseline;gap:9px;min-width:0;margin-bottom:5px}
.filename{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.dims{flex:0 0 auto;margin-left:auto;font-size:11px;color:var(--muted);letter-spacing:.08em;font-weight:300}

.modes{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;flex:1 1 auto;grid-auto-rows:minmax(min-content,1fr)}
.mode{
  position:relative;border:1px solid var(--rule);background:var(--card);
  padding:0;cursor:pointer;text-align:left;color:inherit;font:inherit;transition:border-color .18s;
}
.mode:hover{border-color:var(--muted)}
.mode:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.mode{display:flex;flex-direction:column}
.mode .sw{flex:1 1 auto;min-height:38px;background:var(--swatch) center/auto repeat}
.mode .nm{flex:0 0 auto;padding:9px 10px 10px;font-size:11px;line-height:1.25;
  letter-spacing:.14em;text-transform:uppercase;border-top:1px solid var(--rule)}
.mode[aria-pressed="true"]{border-color:var(--accent)}
.mode[aria-pressed="true"] .nm{background:var(--accent);color:#fff;border-top-color:var(--accent)}

.counts{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.count{
  border:1px solid var(--rule);background:var(--card);color:var(--muted);
  font:inherit;font-size:12px;letter-spacing:.06em;padding:11px 0;text-align:center;
  cursor:pointer;transition:all .18s;font-variant-numeric:tabular-nums;
}
.count:hover{border-color:var(--accent);color:var(--ink)}
.count[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
.count:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* anchored top-left, like the download, so a whole number of repeats across fills the
   stage edge to edge — centring split a block at each edge whenever the tile was one motif wide */
.surface{position:absolute;inset:0;background:var(--swatch) left top/auto repeat}

/* ---------- cropper ---------- */
/* the frame — .overlay, .overlayhead, .overlayfoot — is in shared/tool.css */
.ratios{display:flex;gap:8px;margin-right:auto}
.ratio{
  border:1px solid var(--rule);background:var(--card);color:var(--muted);
  font:inherit;font-size:10px;letter-spacing:.18em;text-transform:uppercase;
  padding:8px 14px;cursor:pointer;transition:all .18s;
}
.ratio:hover{border-color:var(--accent);color:var(--ink)}
.ratio[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
.ratio:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.cropacts{display:flex;align-items:center;gap:20px}
.cropstage{flex:1;display:flex;align-items:center;justify-content:center;padding:32px;overflow:hidden}
.cropwrap{position:relative;line-height:0;touch-action:none}
.cropwrap img{display:block;max-width:100%;max-height:100%;user-select:none;-webkit-user-drag:none}
.cropbox{
  position:absolute;box-sizing:border-box;border:1px solid #fff;cursor:move;
  box-shadow:0 0 0 9999px rgba(42,39,36,.55);
}
.hdl{position:absolute;width:16px;height:16px;background:#fff;border:1px solid var(--accent)}
.hdl.nw{left:-8px;top:-8px;cursor:nwse-resize}
.hdl.ne{right:-8px;top:-8px;cursor:nesw-resize}
.hdl.sw{left:-8px;bottom:-8px;cursor:nesw-resize}
.hdl.se{right:-8px;bottom:-8px;cursor:nwse-resize}

/* must match shared/tool.css and shared/tool.js */
@media (max-width:820px) and (min-height:500px){
  /* no rule and no label above it any more, so its top padding is only buying air the
     strapline's line-height has already paid for — the brand's own padding is the gap.
     Two classes deep so the .block padding shorthand in shared/tool.css cannot undo it */
  .block.upload{padding-top:0}
  .upload .eyebrow{display:none}
  .drop{padding:16px 12px}
  .modes{grid-template-columns:repeat(4,1fr);gap:6px;grid-auto-rows:auto}
  .mode .sw{flex:none;height:52px}
  .mode .nm{padding:5px 4px 6px;font-size:8.5px;letter-spacing:.06em;text-align:center}
  .counts{gap:6px}
  .count{padding:10px 0}
}

@media (max-width:820px) and (min-height:500px) and (max-height:780px){
  .mode .sw{height:44px}
  .count{padding:9px 0}
}

@media (max-width:820px) and (min-height:500px) and (max-height:700px){
  .mode .sw{height:40px}
}

@media (min-width:821px) and (max-height:660px){
  .drop{padding:16px 12px}
  .count{padding:9px 0}
  .mode .sw{min-height:30px}
}

