/* TESLON — PFP Lab */

.pfp-body {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(232, 16, 42, .16), transparent 55%),
    linear-gradient(180deg, #0a0a0d, #08080a 60%);
  min-height: 100vh;
}

.lab-back {
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
}
.lab-back:hover { color: #ffd7dc; }

.lab {
  display: grid; gap: clamp(20px, 3vw, 40px);
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: start;
  width: min(100% - var(--pad) * 2, 1360px);
  margin: clamp(20px, 4vw, 46px) auto clamp(50px, 7vw, 80px);
}
@media (max-width: 980px) { .lab { grid-template-columns: 1fr; } }

/* ---------- stage ---------- */
.lab__stage { position: sticky; top: 16px; }
@media (max-width: 980px) { .lab__stage { position: static; } }

.lab__stage-head h1 { font-size: clamp(34px, 6vw, 58px); text-transform: uppercase; }
.lab__stage-head h1 span { color: var(--red); }
.lab__stage-head p { color: var(--muted); margin: 8px 0 18px; }

.canvas-wrap {
  position: relative; border-radius: 6px;
  background: #0b0b0f;
}
.canvas-wrap canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 1/1;
  border-radius: 2px; background: #08080a;
}

.lab__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.lab__actions .btn { flex: 1 1 150px; justify-content: center; white-space: nowrap; padding-inline: 18px; }
.lab__note { color: #6d7480; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 0; }

/* ---------- picker ---------- */
.lab__tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  position: sticky; top: 0; z-index: 5; padding: 10px 0;
  background: linear-gradient(180deg, #08080a 70%, transparent);
}
.tab {
  padding: 10px 16px; border-radius: 3px; font-family: var(--display); font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line); transition: all .18s var(--ease);
}
.tab:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--chrome); }
.tab.is-active { background: var(--red); color: #fff; box-shadow: none; }
.tab__count { opacity: .6; margin-left: 6px; font-size: 11px; }

.panel { display: none; }
.panel.is-active { display: block; }

.item-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.item {
  position: relative; aspect-ratio: 1/1; border-radius: 5px; overflow: hidden;
  background: linear-gradient(180deg, #16161c, #0d0d11);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.item:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--chrome); }
.item.is-on { box-shadow: inset 0 0 0 2px var(--red), 0 8px 24px rgba(232, 16, 42, .3); }
.item.is-on::after {
  content: ""; position: absolute; right: 6px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red);
}
.item img, .item canvas { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.item__name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px;
  background: linear-gradient(0deg, rgba(8, 8, 10, .92), transparent);
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  text-align: center; color: #c3c9d3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item--none { display: grid; place-items: center; font-family: var(--display); font-size: 12px; color: var(--muted); letter-spacing: .1em; }

.picker-hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* ---------- penyetel ukuran / posisi / rotasi ---------- */
.tweak {
  margin-top: 18px; padding: 16px 18px; border-radius: 8px;
  background: linear-gradient(180deg, #15151b, #0e0e12);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tweak.is-off { opacity: .45; }
.tweak__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px;
}
.tweak__reset {
  font-family: var(--display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); padding: 6px 10px; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(232, 16, 42, .5);
}
.tweak__reset:hover { background: rgba(232, 16, 42, .16); }
.tweak__row {
  display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 12px;
  margin-bottom: 10px; font-size: 13px; color: #c3c9d3;
}
.tweak__row:last-child { margin-bottom: 0; }
@media (max-width: 520px) { .tweak__row { grid-template-columns: 1fr; gap: 4px; } }

.tweak input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, var(--red), #4a4a55); outline: none;
}
.tweak input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--chrome); box-shadow: 0 2px 8px rgba(0, 0, 0, .6); cursor: pointer;
}
.tweak input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: var(--chrome); cursor: pointer;
}
.tweak input[type="range"]:disabled { opacity: .5; cursor: not-allowed; }

.text-input {
  width: 100%; padding: 11px 13px; border: 0; border-radius: 4px;
  background: #0a0a0e; color: #fff; font-family: var(--display); font-size: 15px;
  letter-spacing: .04em; box-shadow: inset 0 0 0 1px var(--line);
}
.text-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--red); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
  transition: transform .15s var(--ease);
}
.swatch:hover { transform: scale(1.12); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--red), inset 0 0 0 1px rgba(255, 255, 255, .4); }

.tweak__row--check { grid-template-columns: auto 1fr; gap: 10px; cursor: pointer; }
.tweak__row--check input { width: 17px; height: 17px; accent-color: var(--red); }
