.nukoo-collage-page .site-header__language {
  display: none;
}

.nukoo-collage-page [hidden] {
  display: none !important;
}

.nukoo-collage-page main > section.collage-app {
  width: min(100% - 2rem, 1500px);
  margin-inline: auto;
}

.collage-app {
  position: relative;
  display: block;
}

.prototype-note {
  width: 100%;
  margin: 0 0 0.8rem;
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  border: 1px solid rgba(89, 48, 0, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.96);
  box-shadow: 0 10px 26px rgba(89, 48, 0, 0.07);
  text-align: left;
}

.prototype-note::after {
  content: "Click to dismiss";
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(89, 48, 0, 0.58);
}

.prototype-note strong {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prototype-note span {
  font-size: 0.92rem;
  color: rgba(89, 48, 0, 0.82);
}

.prototype-note.is-dismissed {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.collage-sidebar,
.collage-toolbar,
.collage-status {
  border: 1px solid rgba(89, 48, 0, 0.14);
  background: rgba(255, 250, 244, 0.96);
  box-shadow: 0 12px 32px rgba(89, 48, 0, 0.08);
}

.collage-sidebar {
  position: absolute;
  z-index: 30;
  top: 1rem;
  left: 1rem;
  width: min(300px, calc(100vw - 2rem));
  max-height: min(470px, calc(100% - 2rem));
  overflow: clip;
  border-radius: 8px;
  transition: width 180ms ease, box-shadow 180ms ease;
}

.collage-sidebar.is-collapsed {
  width: 112px;
  min-width: 112px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.collage-sidebar.is-collapsed .collage-sidebar__title,
.collage-sidebar.is-collapsed .sticker-library {
  display: none;
}

.collage-sidebar:not(.is-collapsed) .collage-icon-button__mark {
  transform: rotate(180deg);
}

.collage-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem;
}

.collage-sidebar__header h2,
.collage-eyebrow {
  margin: 0;
}

.collage-sidebar__header h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.collage-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(89, 48, 0, 0.68);
}

.collage-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 92px;
  height: 38px;
  padding-inline: 0.7rem;
  flex: 0 0 auto;
  border: 1px solid rgba(89, 48, 0, 0.18);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}

.collage-icon-button__mark {
  display: inline-block;
  font-size: 1.15rem;
  transition: transform 180ms ease;
}

.sticker-library {
  max-height: 400px;
  overflow: auto;
  padding: 0 0.7rem 0.7rem;
}

.sticker-category {
  border-bottom: 1px solid rgba(89, 48, 0, 0.1);
  padding-block: 0.2rem;
}

.sticker-category:last-child {
  border-bottom: 0;
}

.sticker-category summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.25rem;
  font-weight: 700;
  cursor: pointer;
}

.sticker-category summary span {
  display: inline-grid;
  place-items: center;
  min-width: 1.8rem;
  min-height: 1.8rem;
  border-radius: 999px;
  background: #f0e0cc;
  font-size: 0.8rem;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.25rem 0 0.85rem;
}

.sticker-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(89, 48, 0, 0.13);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.sticker-tile:hover,
.sticker-tile:focus-visible {
  outline: 3px solid rgba(149, 114, 79, 0.22);
  outline-offset: 1px;
}

.sticker-tile img {
  max-width: 86%;
  max-height: 86%;
  object-fit: contain;
  pointer-events: none;
}

.collage-workspace {
  min-width: 0;
}

.collage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 8px;
}

.tool-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.tool-group label {
  font-size: 0.82rem;
  font-weight: 700;
}

.tool-group--compact {
  padding-inline: 0.3rem;
}

.tool-group--actions {
  margin-left: auto;
  justify-content: flex-end;
}

.custom-size {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.collage-toolbar select,
.collage-toolbar input[type="number"] {
  min-height: 38px;
  border: 1px solid rgba(89, 48, 0, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
}

.collage-toolbar select {
  max-width: 210px;
  padding-inline: 0.7rem;
}

.collage-toolbar input[type="number"] {
  width: 84px;
  padding-inline: 0.55rem;
}

#brush-width-number {
  width: 70px;
}

.collage-toolbar input[type="color"] {
  width: 40px;
  height: 38px;
  border: 1px solid rgba(89, 48, 0, 0.18);
  border-radius: 8px;
  background: #ffffff;
  padding: 0.2rem;
}

.collage-toolbar input[type="range"] {
  width: 110px;
  accent-color: #95724f;
}

.tool-unit {
  margin-left: -0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(89, 48, 0, 0.66);
}

.collage-button {
  min-height: 38px;
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(89, 48, 0, 0.18);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
}

.collage-button:hover,
.collage-button:focus-visible,
.collage-button.is-active {
  background: #95724f;
  color: #ffffff;
}

.collage-button--quiet {
  background: #f8eee2;
}

.collage-status {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.collage-status.is-error {
  border-color: rgba(160, 52, 32, 0.5);
  background: #fff1ed;
  color: #8f2b1b;
}

.canvas-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 58vh;
  margin-top: 0.9rem;
  padding: 1rem;
  overflow: auto;
  border: 1px dashed rgba(89, 48, 0, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(149, 114, 79, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(149, 114, 79, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(149, 114, 79, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(149, 114, 79, 0.08) 75%);
  background-color: #f7efe5;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.canvas-stage .canvas-container {
  box-shadow: 0 18px 44px rgba(89, 48, 0, 0.16);
}

.canvas-stage canvas.lower-canvas {
  background: #ffffff;
}

.canvas-stage canvas.upper-canvas {
  background: transparent;
}

.canvas-drop-hint {
  position: absolute;
  inset: 1rem;
  z-index: 5;
  display: none;
  place-items: center;
  border: 2px dashed rgba(89, 48, 0, 0.34);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.82);
  font-weight: 700;
  pointer-events: none;
}

.canvas-stage.is-dragging .canvas-drop-hint {
  display: grid;
}

@media (max-width: 1100px) {
  .collage-sidebar {
    max-height: min(420px, calc(100% - 2rem));
  }

  .sticker-library {
    max-height: 360px;
  }

  .sticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  }

  .tool-group--actions {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .nukoo-collage-page main > section.collage-app {
    width: min(100% - 1rem, 1500px);
  }

  .collage-toolbar,
  .tool-group,
  .custom-size,
  .prototype-note {
    align-items: stretch;
  }

  .prototype-note::after {
    width: 100%;
    margin-left: 0;
  }

  .collage-sidebar {
    width: min(300px, calc(100vw - 1rem));
  }

  .collage-toolbar select,
  .collage-button {
    width: 100%;
  }

  .tool-group {
    width: 100%;
  }

  .tool-group--compact {
    padding-inline: 0;
  }

  .collage-toolbar input[type="range"] {
    width: 100%;
  }

  .canvas-stage {
    min-height: 46vh;
    padding: 0.5rem;
  }
}
