.resizer-main { padding-top: 4rem; padding-bottom: 5rem; }
.resizer-main h1 { font-size: clamp(1.8rem, 5vw, 4rem); letter-spacing: .14em; overflow-wrap: anywhere; }
.resizer-intro { color: var(--soft); margin: 1.5rem 0 3rem; line-height: 1.7; }
.resizer-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: start; }
.resizer-controls { display: grid; gap: 1.5rem; min-width: 0; }
.resizer-panel { border: 1px solid var(--line); padding: clamp(1.1rem, 3vw, 2rem); min-width: 0; }
.resizer-panel h2 { font-size: .72rem; letter-spacing: .15em; line-height: 1.7; margin: 0 0 1.5rem; }
.resizer-panel label { display: block; font-size: .8rem; line-height: 1.6; }
.resizer-panel input[type=number], .resizer-panel select { display: block; width: 100%; min-width: 0; min-height: 48px; margin: .55rem 0 1.2rem; padding: .8rem; background: #080808; color: #eee; border: 1px solid #555; border-radius: 0; font: inherit; font-size: .85rem; }
.resizer-panel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.dimension-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .65rem; }
.resizer-panel .lock { display: flex; align-items: center; gap: .7rem; min-height: 44px; margin-bottom: 1rem; }
.lock input { width: 20px; height: 20px; accent-color: #fff; }
.hint { color: #aaa; font-size: .72rem; line-height: 1.8; overflow-wrap: anywhere; }
.resizer-panel button, .resizer-panel .file-label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: 1rem 1.2rem; border: 1px solid #777; border-radius: 0; background: #080808; color: #eee; font: inherit; font-size: .78rem; line-height: 1.6; cursor: pointer; text-decoration: none; }
.resizer-panel button { width: 100%; }
.resizer-panel .primary { background: #fff; color: #000; border-color: #fff; }
.resizer-panel .subtle { margin-top: 1rem; background: transparent; border-color: #333; }
.resizer-panel button:not(:disabled):hover, .resizer-panel .file-label:hover, #drop-zone.dragging, #preview-drop-zone.dragging { border-color: #fff; box-shadow: 0 0 18px #ffffff40; }
.resizer-panel :focus-visible, .file-label:has(+ input:focus-visible) { outline: 2px solid #fff; outline-offset: 4px; box-shadow: 0 0 18px #ffffff40; }
.resizer-panel :disabled { opacity: .4; cursor: not-allowed; }
#image-input, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.resizer-stage { height: clamp(220px, 30vw, 420px); display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#141414 0% 25%, #080808 0% 50%) 0 0 / 24px 24px; border: 1px solid #252525; padding: 1rem; }
#preview { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
#empty { color: #aaa; font-size: .8rem; text-align: center; line-height: 1.8; }
#status { font-size: .8rem; line-height: 1.8; margin-top: 1.5rem; }
#error { color: #fff; font-size: .8rem; line-height: 1.7; }
#error:not(:empty) { border-left: 2px solid #fff; padding-left: .8rem; }
[hidden] { display: none !important; }
@media (max-width: 760px) { .resizer-layout { grid-template-columns: 1fr; } .resizer-main { padding-top: 2.5rem; } }
