.rz-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .rz-grid { grid-template-columns: minmax(0, 1fr); } }
.rz-dims { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.rz-lock[aria-pressed="false"] { color: var(--text-3); }
.rz-lock[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.rz-note { margin: -4px 0 0; min-height: 1em; }
#qv, #pv { color: var(--accent); font-weight: 600; }
#ratio button { padding: 6px 9px; }

.rz-stage { border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; padding: 10px; }
.rz-in { position: relative; display: inline-block; line-height: 0; overflow: hidden; touch-action: none; user-select: none; max-width: 100%; }
.rz-in img { display: block; max-width: 100%; max-height: 440px; -webkit-user-drag: none; pointer-events: none; }
.rz-box { position: absolute; cursor: move; outline: 2px solid #fff; outline-offset: -2px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62);
  background-image: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)),
    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35));
  background-size: 1px 100%, 1px 100%, 100% 1px, 100% 1px; background-position: 33.33% 0, 66.66% 0, 0 33.33%, 0 66.66%; background-repeat: no-repeat; }
.rz-box:focus-visible { outline: 3px solid var(--accent); }
.rz-h { position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 4px; box-shadow: 0 1px 6px rgba(0,0,0,.5); }
.rz-h[data-h="nw"] { left: -3px; top: -3px; cursor: nwse-resize; }
.rz-h[data-h="ne"] { right: -3px; top: -3px; cursor: nesw-resize; }
.rz-h[data-h="sw"] { left: -3px; bottom: -3px; cursor: nesw-resize; }
.rz-h[data-h="se"] { right: -3px; bottom: -3px; cursor: nwse-resize; }

.rz-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rz-item { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; min-width: 0; }
.rz-item.is-sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rz-item img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; flex: none; }
.rz-item div { flex: 1; min-width: 0; display: grid; font-size: 12px; color: var(--text-3); }
.rz-item b { font-size: 13px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ratio button:disabled { opacity: .4; cursor: not-allowed; }
