body[data-local-tool="collage"] .local-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 280px;
}
body[data-local-tool="collage"] .local-collage-layout-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
body[data-local-tool="collage"] .local-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 76px;
  padding: 6px 3px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collage-layout-thumb {
  position: relative;
  display: block;
  flex: none;
  width: 56px;
  height: 40px;
  background: #f2f7f4;
  border: 1px solid #d3e3da;
}
.collage-layout-thumb i {
  position: absolute;
  background: #9dcfbb;
}
.collage-layout-thumb i:nth-child(3n+2) { background: #b6ddc9; }
.collage-layout-thumb i:nth-child(3n) { background: #79b59f; }
body[data-local-tool="collage"] .local-options button[aria-pressed="true"] .collage-layout-thumb {
  border-color: #c5dfd2;
}
body[data-local-tool="collage"] .local-collage-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}
.local-collage-ratios {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 56px;
  gap: 7px;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 2px 7px;
  scrollbar-width: thin;
}
.local-collage-ratios button {
  width: 56px;
  height: 68px;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #687485;
  background: #f6f8fa;
  font-size: 10px;
  white-space: nowrap;
}
.local-collage-ratios button[aria-pressed="true"],
.local-collage-gaps button[aria-pressed="true"] {
  border-color: #007aff;
  color: #0062cc;
  background: #eaf4ff;
  font-weight: 700;
}
.local-collage-ratio-frame { position: relative; display: block; flex: none; }
.local-collage-ratio-frame.is-auto { border: 1px dashed currentColor; }
.local-collage-ratio-frame i { position: absolute; width: 8px; height: 8px; }
.local-collage-ratio-frame i:nth-child(1) { top: 0; left: 0; border-top: 2px solid; border-left: 2px solid; }
.local-collage-ratio-frame i:nth-child(2) { top: 0; right: 0; border-top: 2px solid; border-right: 2px solid; }
.local-collage-ratio-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom: 2px solid; border-left: 2px solid; }
.local-collage-ratio-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom: 2px solid; border-right: 2px solid; }
.local-collage-gap-controls { display: grid; gap: 8px; }
.local-collage-gaps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.local-collage-gaps button { min-width: 0; height: 34px; padding: 0 2px; background: #f6f8fa; font-size: 11px; }
.local-collage-colors { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); align-items: start; gap: 7px; }
.local-collage-swatch { width: 100%; height: 34px; padding: 0; border: 1px solid #d9dfe7; border-radius: 6px; }
.local-collage-swatch[aria-pressed="true"] { outline: 2px solid #007aff; outline-offset: 1px; }
.local-collage-swatch.is-transparent { background: conic-gradient(#d7dce2 25%,#fff 0 50%,#d7dce2 0 75%,#fff 0) 0/12px 12px; }
.local-collage-custom-color { display: flex !important; align-items: center; flex-direction: column; gap: 2px !important; min-width: 0; font-size: 10px !important; white-space: nowrap; cursor: pointer; }
.local-collage-custom-color input[type="color"] { width: 100%; height: 34px; padding: 2px; border: 1px solid #d9dfe7; border-radius: 6px; background: #fff; cursor: pointer; }
body[data-local-tool="collage"] [data-sort-handle] { cursor: grab; touch-action: none; user-select: none; -webkit-touch-callout: none; }
body[data-local-tool="collage"] .local-file.is-dragging { opacity: .45; }
body[data-local-tool="collage"] .local-file.is-drop-target { outline: 2px solid #007aff; outline-offset: -2px; }
.file-sort-ghost { position: fixed; z-index: 9999; pointer-events: none; opacity: .9; max-width: 240px; background: #fff; box-shadow: 0 6px 24px #0003; }
