.stickerStage {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.stickerPreview{
  flex: 1 1 520px;
  max-width: 760px;
  height: calc(100vh - 170px);
  min-height: 520px;
}

.stickerControls{
  flex: 1 1 480px;
  max-width: 560px;
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.stickerControls::-webkit-scrollbar{
  width: 10px;
}
.stickerControls::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
}
.stickerControls::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.12);
  border-radius: 999px;
}

@media (max-width: 980px) {
  .stickerPreview{
    height: calc(100vh - 190px);
    min-height: 440px;
    max-width: none;
  }

  .stickerControls{
    position: static;
    max-height: none;
    overflow: visible;
    max-width: none;
  }
}

.stickerCanvasWrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: 100%;
  min-width: 0;
  background: rgba(2, 6, 23, 0.12);
}

.stickerCanvasWrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  opacity: 0.22;
  pointer-events: none;
}

.stickerCanvasFrame {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.stickerCanvas {
  display: block;
  border-radius: 14px;
  background: transparent;
  touch-action: none;
}

.stickerHint {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(248, 250, 252, 0.86);
  font-size: 12px;
  line-height: 1.35;
}

.stickerControls .controls__group {
  margin-bottom: 12px;
}

.stickerRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stickerWide{
  grid-column: 1 / -1;
}

.stickerRow--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.stickerSmall {
  font-size: 12px;
  color: rgba(248, 250, 252, 0.74);
}

.stickerActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stickerLayers {
  display: grid;
  gap: 8px;
}

.stickerLayer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  color: rgba(248, 250, 252, 0.90);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.stickerLayer:hover {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(2, 6, 23, 0.60);
}

.stickerLayer.is-active {
  border-color: rgba(34, 197, 94, 0.85);
  background: rgba(15, 23, 42, 0.65);
}

.stickerLayer__meta {
  display: grid;
  gap: 2px;
}

.stickerLayer__title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

.stickerLayer__sub {
  font-size: 12px;
  color: rgba(248, 250, 252, 0.68);
}

.stickerLayer__btns {
  display: flex;
  gap: 6px;
}

.stickerTinyBtn {
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.30);
  color: rgba(248, 250, 252, 0.88);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.stickerTinyBtn:hover {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(2, 6, 23, 0.45);
}

.stickerTinyBtn:disabled {
  opacity: 0.45;
  cursor: default;
}

.stickerHiddenInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
