/* Collage tools: crisp, consistent icon buttons in the bottom app toolbar. */
.cg-page .vb-editor-bottom {
  padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--gs-paper);
  border-top: 1px solid #eddfeb;
  box-shadow: 0 -8px 28px #70507712;
}

.cg-page .vb-editor-bottom nav {
  width: min(100%, 610px);
  margin-inline: auto;
  gap: 9px;
}

.cg-page .vb-editor-bottom button {
  flex: 1 1 0;
  min-width: 70px;
  min-height: 72px;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid #efdfec;
  border-radius: 17px;
  background: linear-gradient(145deg, #fffafd, #f8f0fa);
  color: #755579;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.cg-page .vb-editor-bottom button:hover {
  border-color: #dcb9d3;
  background: linear-gradient(145deg, #fff7fb, #f4e9f7);
  box-shadow: 0 5px 14px #8c508012;
  transform: translateY(-1px);
}

.cg-page .vb-editor-bottom button:active { transform: scale(.97); }

.cg-page .vb-editor-bottom button:focus-visible {
  outline: 3px solid #a74c89;
  outline-offset: 2px;
}

.cg-page .vb-tool-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid #efd9e9;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #fcecf5);
  color: #a34883;
}

.cg-page .vb-tool-icon svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cg-page .cg-photo-size-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--gs-line);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gs-paper), var(--gs-blush));
  font-size: 13px;
  font-weight: 600;
}

.cg-page .cg-photo-size-control output {
  min-width: 50px;
  color: var(--gs-rose);
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.cg-page .cg-photo-size-control input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 28px;
  margin: 0;
  accent-color: #a34883;
}

.cg-page .cg-photo-edit-hint {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7eff8;
  color: var(--gs-muted);
}

.cg-page .cg-crop-zoom-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 11px 14px;
  border: 1px solid var(--gs-line);
  border-radius: 14px;
  background: var(--gs-paper);
  font-size: 13px;
}

.cg-page .cg-crop-zoom-control output {
  color: var(--gs-rose);
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.cg-page .cg-crop-zoom-control input { grid-column: 1 / -1; width: 100%; accent-color: #a34883; }
.cg-page .cg-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block: 12px; }
.cg-page .cg-photo-actions button { min-height: 44px; margin: 0; }
.cg-page #board-tools-sheet [data-board-panel="effects"] > label { display: grid; grid-template-columns: minmax(105px, .8fr) minmax(120px, 1.2fr); align-items: center; gap: 12px; margin-block: 8px; font-size: 13px; }
.cg-page #board-tools-sheet [data-board-panel="effects"] > label input[type="range"] { width: 100%; min-height: 30px; accent-color: #a34883; }
.cg-page #board-tools-sheet [data-board-panel="effects"] h3,.cg-page #cg-photo-tools h3 { margin-top: 8px; }

.cg-page .cg-ui-icon { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cg-page .cg-label-icon { display: inline-block; width: 17px; height: 17px; margin-inline-end: 7px; vertical-align: -4px; color: #a34883; }
.cg-page #board-tools-sheet .cg-icon-action { min-width: 76px; min-height: 64px; padding: 8px 9px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; line-height: 1.2; white-space: normal; }
.cg-page #board-tools-sheet .cg-icon-action .cg-ui-icon { width: 22px; height: 22px; }
.cg-page #board-tools-sheet button:disabled { opacity: .48; cursor: not-allowed; }
.cg-page #board-tools-sheet button[aria-pressed="true"] { border-color: #a34883; background: #fceaf4; color: #793c69; box-shadow: 0 0 0 1px #a3488350; }
.cg-page .cg-adjust-row { display: grid; grid-template-columns: minmax(0,1fr) 46px 44px; gap: 8px; align-items: center; margin: 8px 0; padding: 8px 10px; border: 1px solid var(--gs-line); border-radius: 13px; background: var(--gs-paper); }
.cg-page .cg-adjust-row label { min-width: 0; display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 3px 6px; margin: 0; font-size: 12px!important; }
.cg-page .cg-adjust-row input[type="range"] { grid-column: 1 / -1; width: 100%!important; min-height: 30px!important; margin: 0; }
.cg-page .cg-adjust-value { min-width: 38px; color: var(--gs-rose); text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.cg-page .cg-reset-control { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--gs-line); border-radius: 12px; background: var(--gs-cream); color: var(--gs-rose); cursor: pointer; }
.cg-page .cg-reset-control .cg-ui-icon { width: 18px; height: 18px; }
.cg-page .cg-photo-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.cg-page .cg-sticker-preview { display: block; width: 38px; height: 38px; margin: 0 auto 7px; fill: none; stroke: #966b91; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cg-page .vb-sticker-grid button { min-height: 92px; }
.cg-page .vb-sticker-grid button:hover .cg-sticker-preview { transform: scale(1.08) rotate(-3deg); }
.cg-page #element-font option[value="serif"] { font-family: Georgia,serif; }
.cg-page #element-font option[value="sans-serif"] { font-family: Arial,sans-serif; }
.cg-page #element-text { font-family: Georgia,serif; }
.cg-page #board-layers { font-family: "Apple Color Emoji","Segoe UI Emoji",sans-serif; }

@media (max-width: 540px) {
  .cg-page .vb-editor-bottom {
    padding-top: 7px;
    padding-inline: max(7px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-left));
  }

  .cg-page .vb-editor-bottom nav { gap: 5px; }
  .cg-page .vb-editor-bottom button {
    min-width: 0;
    min-height: 64px;
    gap: 4px;
    padding: 4px 2px;
    border-radius: 14px;
    font-size: 10px;
  }

  .cg-page .vb-tool-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 11px;
  }

  .cg-page .vb-tool-icon svg { width: 19px; height: 19px; }
  .cg-page #board-editor .vb-top-actions .vb-icon,
  .cg-page #board-editor .vb-editor-top > .vb-icon { min-width: 44px; width: 44px; min-height: 44px; }
  .cg-page #board-editor .vb-top-actions .vb-save,
  .cg-page #board-editor .vb-top-actions .vb-export { min-width: 44px; min-height: 44px; }
  .cg-page #board-tools-sheet .cg-icon-action { min-width: 66px; min-height: 60px; padding: 6px; font-size: 11px; }
  .cg-page .cg-adjust-row { grid-template-columns: minmax(0,1fr) 38px 44px; gap: 5px; padding: 7px; }
  .cg-page .cg-sticker-preview { width: 34px; height: 34px; }
}

@media (max-width: 360px) {
  .cg-page #board-editor .vb-top-actions .vb-save { width: 44px; padding: 0; font-size: 0; }
  .cg-page #board-editor .vb-top-actions .vb-save .cg-ui-icon { width: 20px; height: 20px; }
}

.cg-page .vb-no-selection #cg-common-tools { display: none!important; }

@media (prefers-reduced-motion: reduce) {
  .cg-page .vb-editor-bottom button { transition: none; }
}
