.jtw-tool {
	--jtw-border: #d9e0e7;
	--jtw-muted: #5b6672;
	--jtw-accent: #1769aa;
	--jtw-surface: #fff;
	color: #17212b;
	font: inherit;
	max-width: 900px;
	margin: 0 auto;
}
.jtw-tool *, .jtw-tool *::before, .jtw-tool *::after { box-sizing: border-box; }
.jtw-tool [hidden] { display: none !important; }
.jtw-intro { color: var(--jtw-muted); margin: 0 0 1rem; }
.jtw-card { background: var(--jtw-surface); border: 1px solid var(--jtw-border); border-radius: 12px; margin: 0 0 1rem; padding: clamp(1rem, 3vw, 1.5rem); }
.jtw-card h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 1rem; }
.jtw-picker { align-items: center; background: #f3f7fb; border: 1px dashed #94abc0; border-radius: 8px; cursor: pointer; display: inline-flex; font-weight: 600; justify-content: center; min-height: 48px; padding: .65rem 1.1rem; }
.jtw-picker:focus-within, .jtw-button:focus-visible { outline: 3px solid #75b9ed; outline-offset: 2px; }
.jtw-picker input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.jtw-drop-area { border: 1px dashed var(--jtw-border); border-radius: 8px; color: var(--jtw-muted); margin-top: .8rem; padding: 1rem; text-align: center; }
.jtw-drop-area.is-dragging { background: #eaf4fc; border-color: var(--jtw-accent); color: var(--jtw-accent); }
.jtw-hint, .jtw-meta { color: var(--jtw-muted); font-size: .92rem; margin: .8rem 0 0; }
.jtw-error { color: #a51d2d; font-weight: 600; margin: .65rem 0 0; }
.jtw-filename { font-weight: 600; overflow-wrap: anywhere; }
.jtw-preview { background: repeating-conic-gradient(#f0f2f4 0% 25%, #fff 0% 50%) 50% / 18px 18px; border: 1px solid var(--jtw-border); border-radius: 8px; display: block; height: auto; margin-top: .75rem; max-height: 520px; max-width: 100%; object-fit: contain; }
.jtw-quality-label { display: block; font-weight: 600; margin-bottom: .5rem; }
.jtw-settings input[type="range"] { accent-color: var(--jtw-accent); display: block; max-width: 520px; width: 100%; }
.jtw-quality-value { display: block; font-weight: 700; margin-top: .35rem; }
.jtw-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.jtw-button { appearance: none; background: #f5f7f9; border: 1px solid #aab7c3; border-radius: 7px; color: #17212b; cursor: pointer; font: inherit; font-weight: 600; min-height: 42px; padding: .55rem .9rem; }
.jtw-button:hover:not(:disabled) { filter: brightness(.96); }
.jtw-button:disabled { cursor: not-allowed; opacity: .58; }
.jtw-button.jtw-primary { background: var(--jtw-accent); border-color: var(--jtw-accent); color: #fff; }
.jtw-status { border-radius: 6px; margin: 0 0 1rem; padding: .7rem .85rem; }
.jtw-status.is-success { background: #edf8f0; color: #175c2c; }
.jtw-status.is-error { background: #fff0f0; color: #9b1c26; }
.jtw-results { border-top: 1px solid var(--jtw-border); margin: 1rem 0; }
.jtw-metric { align-items: baseline; border-bottom: 1px solid var(--jtw-border); display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; padding: .65rem 0; }
.jtw-metric dt { color: var(--jtw-muted); }
.jtw-metric dd { font-weight: 600; margin: 0; text-align: right; }
@media (max-width: 520px) {
	.jtw-metric { display: block; }
	.jtw-metric dd { margin-top: .2rem; text-align: left; }
	.jtw-actions .jtw-button { flex: 1 1 auto; }
}
