/* The three free social tools (27 Nov 2026): the resizer, the caption length checker and the safe zone checker. Follows
   DESIGN.md: flat, square containers, the touch radius only for what you press or type into, 44 px targets, nothing
   under 12 px, no shadows, colour fades or Lime. Shared form parts (inputs, drop box) come from site.css and colour-tools.css. */

.st-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.st-row label { flex: 1 1 220px; }
.st-label { margin: 0 0 6px; font: 600 13px/18px var(--wn-font); }
.st-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.st-fs legend { font: 600 13px/18px var(--wn-font); padding: 0; margin-bottom: 8px; }
.st-checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.tool .st-check { display: inline-flex !important; align-items: center; gap: 10px; min-height: 44px; font: 400 15px/1.3 var(--wn-font) !important; cursor: pointer; }
.st-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--wn-ink); flex: none; }
.st-check .mono { color: var(--wn-slate); font-size: 13px; }
.st-check input:focus-visible, .st-sz select:focus-visible, .st-rs select:focus-visible, .st-cap textarea:focus-visible { outline: 3px solid var(--wn-ink); outline-offset: 2px; }
.st-rs select, .st-sz select { border-radius: var(--wn-r-touch, 6px); min-height: 44px; }
.st-cap textarea { border-radius: var(--wn-r-touch, 6px); width: 100%; box-sizing: border-box; min-height: 180px; }
.tool .tool-drop { position: relative; }
.st-rs .tool-drop input, .st-sz .tool-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.st-rs .tool-drop:focus-within, .st-sz .tool-drop:focus-within { outline: 3px solid var(--wn-ink); outline-offset: 2px; }
.tool-drop.over { border-color: var(--wn-ink); }
.st-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.st-table th, .st-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--wn-line-strong); }
.st-table thead th { font: 500 12px/1.3 var(--wn-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--wn-slate); }
.st-table td a { overflow-wrap: anywhere; }

/* ---------- the resizer ---------- */
.st-rs-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.st-rs .tool-drop { min-height: 160px; padding: 16px; }
.st-rs-focus[hidden] { display: none; }
.st-rs-src { position: relative; display: inline-block; max-width: 100%; line-height: 0; touch-action: none; cursor: crosshair; border: 1px solid var(--wn-line); }
.st-rs-src canvas { display: block; max-width: 100%; max-height: 320px; width: auto; height: auto; }
.st-rs-dot { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 3px solid var(--wn-white); outline: 2px solid var(--wn-ink); background: rgba(18, 46, 39, 0.35); box-sizing: border-box; cursor: grab; }
.st-rs-dot:focus-visible { outline: 3px solid var(--wn-ink); outline-offset: 3px; }
.st-rs-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.st-rs-card { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--wn-line); background: var(--wn-white); min-width: 0; }
.st-rs-card p { margin: 0; font-size: 14px; overflow-wrap: anywhere; } .st-rs-card .mono { color: var(--wn-slate); font-size: 13px; }
.st-rs-card .btn { justify-self: start; min-height: 44px; padding: 0 14px; box-sizing: border-box; }
.st-rs-thumb { display: grid; place-items: center; height: 170px; background: var(--wn-paper); border: 1px solid var(--wn-line); padding: 8px; box-sizing: border-box; }
.st-rs-thumb canvas { display: block; max-width: 100%; max-height: 152px; width: auto; height: auto; }
.st-warn:empty { display: none; } .st-warn { color: #8A4B00; }
@media (max-width: 760px) { .st-rs-top { grid-template-columns: minmax(0, 1fr); } .st-rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .st-rs-thumb { height: 130px; } .st-rs-thumb canvas { max-height: 112px; } .st-rs-card { padding: 8px; } }

/* ---------- the caption checker ---------- */
.st-cc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.st-cc-row { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--wn-line); border-left: 4px solid var(--wn-moss, #3E6B5A); background: var(--wn-white); min-width: 0; }
.st-cc-row.over { border-left-color: #B42318; }
.st-cc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.st-cc-head b { font-size: 16px; } .st-cc-head .mono { font-size: 14px; } .st-cc-head small { font-size: 12px; color: var(--wn-slate); }
.st-bar { display: block; height: 6px; background: var(--wn-paper); border: 1px solid var(--wn-line); }
.st-bar s { display: block; height: 100%; background: var(--wn-ink); text-decoration: none; }
.st-cc-row.over .st-bar s { background: #B42318; }
.st-cc-note { margin: 0; font-size: 14px; } .st-cc-row.over .st-cc-note b { color: #B42318; }
.st-cc-fold { border-top: 1px solid var(--wn-line); padding-top: 8px; }
.st-cc-pre { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.st-cc-pre i { color: var(--wn-slate); font-style: normal; } .st-more { color: var(--wn-slate); font-weight: 600; }
@media (max-width: 600px) { .st-cc-list { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the safe zone checker ---------- */
.st-sz { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: start; gap: 32px; }
.st-sz-form { display: grid; gap: 16px; min-width: 0; }
.st-sz .tool-drop { min-height: 140px; padding: 16px; text-align: center; }
.st-sz-stage { display: grid; place-items: center; background: var(--wn-paper); border: 1px solid var(--wn-line); padding: 12px; box-sizing: border-box; min-width: 0; }
.st-sz-frame { max-width: 100%; line-height: 0; }
.st-sz-frame canvas { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; }
@media (max-width: 860px) { .st-sz { grid-template-columns: minmax(0, 1fr); } .st-sz-frame canvas { max-height: 64vh; } }
