/* The image resizer (/image-resizer), on the foundation, tool.css and the video checker's drop tile (video.css): the
   editor is the drop tile, three choices between hairlines, the sizes to make and a size of your own; the well shows each
   size made from the photo, its shape at a glance, with its numbers and Download, then the pennant. */
.resizer .editor { border-radius: 12px; transition: background .15s ease-out, box-shadow .15s ease-out; }
.resizer .editor.drop { background: var(--muted); box-shadow: 0 0 0 12px var(--muted); }
.resizer .hint { min-height: 20px; margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted-foreground); }

.resizer .set { margin-top: 20px; border-top: 1px solid var(--border); }
.resizer .field { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--muted-foreground); }
.resizer .field > :first-child { flex: none; }
.resizer .seg button { padding: 0 11px; }
#bg-field { display: none; }
.is-fit #bg-field { display: flex; }

/* The sizes: a row each, its name and pixels, ink when it is made. */
.sizes-h { margin: 24px 0 8px; font-size: 15px; font-weight: 400; color: var(--muted-foreground); }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sizes button {
  display: inline-flex; align-items: baseline; gap: 8px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: var(--muted); color: var(--muted-foreground); font-size: 14.5px; font-weight: 500; cursor: pointer; text-align: left;
  transition: background .15s ease-out, color .15s ease-out;
}
.sizes button .dims { font-size: 13px; font-variant-numeric: tabular-nums; opacity: .8; }
.sizes button[aria-pressed="true"] { background: var(--foreground); color: var(--background); }
.own { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 15px; color: var(--muted-foreground); }
.own label { flex: none; }
.own .wh { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.own input { width: 0; flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--input); border-radius: 10px; background: var(--background); color: var(--foreground); font-size: 16px; font-variant-numeric: tabular-nums; }
.own input:focus-visible { outline: 2px solid var(--foreground); outline-offset: 0; }
.own [data-slot="button"] { height: 40px; padding: 0 14px; }

/* The well: a card per size, each shape drawn at once, two across. */
.resizer .view { display: block; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 20px; border-radius: 12px; background: var(--muted); list-style: none; align-items: end; }
.cards:empty { display: none; }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card .cut { display: flex; align-items: center; justify-content: center; height: 260px; }
.card .shape { position: relative; max-width: 100%; max-height: 100%; overflow: hidden; border-radius: 6px; background: var(--background); box-shadow: 0 0 0 .5px var(--border), 0 1px 3px rgba(36, 17, 12, .1); }
.card.round .shape { border-radius: 999px; }
.card canvas { display: block; width: 100%; height: 100%; }
.card .shape.drag { cursor: grab; touch-action: none; }
.card .shape.drag:active { cursor: grabbing; }
.card .words { display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.card .words b { font-size: 15.5px; font-weight: 600; color: var(--foreground); }
.card .words span { font-size: 14px; line-height: 1.4; color: var(--muted-foreground); }
.card .words .dims { font-variant-numeric: tabular-nums; color: var(--foreground-soft); }
.card .words .soft { color: var(--destructive); }
.card [data-slot="button"] { align-self: flex-start; height: 40px; padding: 0 14px; }
.resizer .result { justify-content: space-between; }
.checked { margin-top: var(--space-5); font-size: 15px; color: var(--muted-foreground); }

@media (max-width: 1119px) {
  .resizer .editor { position: static; }
}
@media (max-width: 759px) {
  .cards { gap: 20px 12px; padding: 12px; }
  .card .cut { height: 170px; }
  .resizer .result { flex-direction: column; align-items: stretch; }
  .resizer .seg button { padding: 0 8px; }
}
