.image-opacity-page [hidden] { display: none !important; }
.opacity-upload-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.opacity-upload-actions p { margin: 0; color: var(--muted); font-size: .8rem; }
.image-opacity-page .image-dropzone { position: relative; min-height: 215px; }
.image-opacity-page .image-dropzone:focus-within { outline: 3px solid #93c5fd; outline-offset: 4px; }
.image-opacity-page .tool-message.is-error { color: #b91c1c; }
.opacity-workspace { scroll-margin-top: 95px; }
.opacity-file-meta { margin: 0 0 22px; }
.opacity-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.opacity-previews figure { min-width: 0; margin: 0; }
.opacity-previews figcaption { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 800; font-size: .84rem; }
.opacity-previews figcaption::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.opacity-previews figure:last-child figcaption { color: var(--blue-dark); }
.opacity-previews figure:last-child figcaption::before { background: var(--blue); }
.opacity-stage { display: grid; min-height: 250px; height: 310px; place-items: center; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background-color: #fff; background-image: conic-gradient(#e2e8f0 25%, #fff 0 50%, #e2e8f0 0 75%, #fff 0); background-size: 24px 24px; }
.opacity-stage[data-background="white"] { background: #fff; }
.opacity-stage[data-background="black"] { background: #111827; }
.opacity-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 276px; object-fit: contain; }
.opacity-settings { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; margin-top: 24px; align-items: start; }
.opacity-primary-control { padding: 20px; border: 1px solid #bfdbfe; border-radius: 14px; background: #f5f8ff; }
.opacity-control-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.opacity-control-head label { font-size: .91rem; font-weight: 800; }
.opacity-number { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--blue-dark); }
.opacity-number input { width: 76px; min-height: 43px; padding: 6px 7px; text-align: center; border: 1px solid #93c5fd; border-radius: 9px; background: #fff; color: var(--blue-dark); font: inherit; }
.opacity-range { width: 100%; margin: 0; min-height: 26px; cursor: pointer; accent-color: var(--blue); }
.opacity-range-labels { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .73rem; margin: 4px 0 16px; }
.opacity-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.opacity-presets button { min-width: 0; min-height: 38px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font: inherit; font-size: .8rem; font-weight: 750; cursor: pointer; }
.opacity-presets button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.opacity-primary-control > p { margin: 12px 0 0; color: var(--muted); font-size: .76rem; }
.opacity-secondary-control { display: grid; gap: 12px; }
.opacity-secondary-control .converter-field { margin: 0; }
.opacity-secondary-control button { min-height: 43px; font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; padding: 9px; }
.opacity-save-row { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.opacity-save-row .button { min-width: 200px; border: 0; cursor: pointer; }
.opacity-save-note { margin: 0; color: var(--muted); font-size: .8rem; }
.opacity-save-note strong { display: block; color: var(--ink-soft); }
.image-opacity-page button:disabled, .image-opacity-page input:disabled { cursor: wait; opacity: .55; }
.opacity-example-button { padding: 10px 16px; border: 1px solid var(--line-strong); background: #fff; color: var(--blue-dark); border-radius: 10px; font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; }
@media (max-width: 700px) {
  .opacity-settings { grid-template-columns: 1fr; }
  .opacity-secondary-control { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .opacity-secondary-control .converter-field { padding: 12px; }
  .opacity-secondary-control button { margin-bottom: 12px; }
  .opacity-stage { height: 240px; min-height: 210px; padding: 12px; }
  .opacity-stage canvas { max-height: 214px; }
  .opacity-previews { gap: 10px; }
}
@media (max-width: 480px) {
  .opacity-previews { grid-template-columns: 1fr; gap: 18px; }
  .opacity-file-meta { grid-template-columns: 1fr; }
  .opacity-file-meta div { display: flex; align-items: start; gap: 10px; padding: 10px 12px; }
  .opacity-file-meta dt { flex: 0 0 75px; margin-top: 2px; }
  .opacity-file-meta dd { margin: 0; }
  .opacity-primary-control { padding: 16px; }
  .opacity-secondary-control { grid-template-columns: 1fr; }
  .opacity-secondary-control button { margin-bottom: 0; }
  .opacity-save-row .button { width: 100%; }
  .opacity-save-row { gap: 12px; }
}
