/* ============================================================================
   StickerPeel — vanilla port (iskra rewrite v3).
   Peel angle is fully arbitrary now. JS computes the clip-path polygon and
   reflection matrix each frame for both sticker-main and flap. The CSS just
   provides the structural skeleton; geometry is JS-driven.
   ========================================================================== */

:root {
  --sticker-rotate: 0deg;
  --sticker-p: 10px;
  --sticker-width: 200px;
  --sticker-shadow-opacity: 0.6;
  --sticker-lighting-constant: 0.1;
}

.sticker-peel.draggable {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5;
  cursor: grab;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.sticker-peel.draggable:active { cursor: grabbing; }

.sticker-container {
  position: relative;
}

.sticker-container * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.sticker-image {
  display: block;
  width: var(--sticker-width, 200px);
  transform: rotate(var(--sticker-rotate));
}

.sticker-main {
  will-change: clip-path;
  /* JS sets clip-path inline */
}

@media (hover: none) and (pointer: coarse) {
  .sticker-peel.draggable { cursor: default; }
  .sticker-container { touch-action: none; }
}

body.menu-phase .sticker-peel {
  display: none;
}

/* ============================================================================
   Sticker dev panel
   ========================================================================== */
#sticker-dev-panel {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 9999;
  width: 280px;
  padding: 12px 14px 14px;
  background: rgba(10, 8, 5, 0.85);
  border: 1px solid rgba(255, 247, 232, 0.22);
  border-radius: 10px;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: #f4efe6;
  backdrop-filter: blur(8px);
  user-select: none;
}
#sticker-dev-panel h4 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  font-weight: 500;
}
#sticker-dev-panel select {
  width: 100%;
  padding: 4px 6px;
  margin-bottom: 12px;
  background: rgba(255, 247, 232, 0.08);
  color: #f4efe6;
  border: 1px solid rgba(255, 247, 232, 0.18);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}
#sticker-dev-panel .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
#sticker-dev-panel .row label {
  flex: 0 0 92px;
  opacity: 0.7;
  font-size: 11px;
  letter-spacing: 0.04em;
}
#sticker-dev-panel .row input[type="range"] {
  flex: 1;
  accent-color: #fd7543;
  cursor: pointer;
}
#sticker-dev-panel .row input[type="number"] {
  width: 56px;
  background: rgba(255, 247, 232, 0.08);
  border: 1px solid rgba(255, 247, 232, 0.18);
  border-radius: 4px;
  color: #f4efe6;
  font-size: 11px;
  padding: 2px 4px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}
body.menu-phase #sticker-dev-panel { display: none; }
