.talents-page {
  --talent-pad: clamp(1rem, 3vw, 2rem);
  --talent-radius: 1.35rem;
  --talent-line: color-mix(in srgb, var(--brand-neon) 22%, transparent);
  --talent-panel: color-mix(in srgb, var(--brand-bg) 78%, #05070c 22%);
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--brand-bg);
  font-family: var(--font-body);
}

.talents-atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, color-mix(in srgb, var(--brand-neon) 24%, transparent), transparent 62%),
    radial-gradient(720px 420px at 92% 8%, color-mix(in srgb, var(--brand-secondary, #ff6a3d) 16%, transparent), transparent 58%),
    radial-gradient(640px 360px at 50% 110%, color-mix(in srgb, var(--brand-primary) 10%, transparent), transparent 55%);
  animation: talentAtmosphere 18s ease-in-out infinite alternate;
}

@keyframes talentAtmosphere {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

.talents-page > .site-header,
.talents-page > .talents-main,
.talents-page > .site-footer {
  position: relative;
  z-index: 1;
}

.talents-page > .site-header,
.talents-page > .site-header.site-header--pinned {
  position: fixed;
  top: 0;
  inset-inline: 0;
  width: 100%;
  z-index: 1000;
}

.talents-main {
  width: min(1180px, calc(100% - 2 * var(--talent-pad)));
  margin: 0 auto;
  padding: 0 0 3.5rem;
  display: grid;
  gap: clamp(2.4rem, 6vw, 4rem);
}

/* ---- Hero: one composition ---- */
.talents-hero {
  min-height: min(72vh, 640px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.85rem;
  padding: clamp(2rem, 7vh, 4rem) 0 clamp(1.5rem, 4vh, 2.5rem);
  animation: talentHeroIn 0.9s ease both;
}

html[dir="rtl"] .talents-hero {
  justify-items: start;
}

.talents-brand {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 800;
  color: var(--brand-neon);
  text-shadow: 0 0 28px color-mix(in srgb, var(--brand-neon) 35%, transparent);
}

.talents-brand.cms-text {
  color: inherit;
  font-size: calc(clamp(0.95rem, 2.4vw, 1.15rem) * var(--cms-size, 100) / 100);
  text-shadow: 0 0 28px color-mix(in srgb, currentColor 35%, transparent);
}

.talents-hero-title {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink, #f4f7fb);
}

.talents-hero-title.cms-text {
  color: inherit;
  font-size: calc(clamp(2.4rem, 8vw, 4.6rem) * var(--cms-size, 100) / 100);
}

.talents-hero-sub {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.55;
}

.talents-hero-sub.cms-text {
  color: inherit;
  font-size: calc(clamp(1.05rem, 2.2vw, 1.2rem) * var(--cms-size, 100) / 100);
}

.talents-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.65rem;
}

@keyframes talentHeroIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Section heads ---- */
.talents-section-head {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.talents-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: var(--ink, #f4f7fb);
}

.talents-section-head h2.cms-text {
  color: inherit;
  font-size: calc(clamp(1.35rem, 3vw, 1.85rem) * var(--cms-size, 100) / 100);
}

.talents-section-head p,
.talent-hint {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.5;
}

.talents-subhead {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink, #f4f7fb) 88%, var(--brand-neon));
}

.talents-empty {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px dashed var(--talent-line);
  border-radius: var(--talent-radius);
}

/* ---- Progress ---- */
.talent-progress {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0.55rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--talent-line);
  background: color-mix(in srgb, var(--brand-bg) 70%, #000 30%);
  overflow-x: auto;
  scrollbar-width: none;
}

.talent-progress::-webkit-scrollbar {
  display: none;
}

.talent-progress li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0.35rem;
  border-radius: 999px;
  font-size: clamp(0.7rem, 1.6vw, 0.82rem);
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.talent-progress li span {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 30%, transparent);
  flex-shrink: 0;
}

.talent-progress li.is-done {
  color: color-mix(in srgb, var(--ink, #f4f7fb) 80%, var(--brand-neon));
}

.talent-progress li.is-done span {
  background: color-mix(in srgb, var(--brand-neon) 22%, transparent);
  border-color: var(--brand-neon);
}

.talent-progress li.is-active {
  color: #0b1220;
  background: var(--brand-neon);
  box-shadow: 0 0 22px color-mix(in srgb, var(--brand-neon) 35%, transparent);
}

.talent-progress li.is-active span {
  border-color: transparent;
  background: color-mix(in srgb, #fff 55%, transparent);
  color: #0b1220;
}

/* ---- Product picker ---- */
.talent-pick-block {
  margin-bottom: 0.5rem;
}

.talent-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.85rem;
}

.talent-product-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem;
  border: 1px solid var(--talent-line);
  border-radius: 1.1rem;
  background: var(--talent-panel);
  color: inherit;
  cursor: pointer;
  text-align: start;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.talent-product-card__media {
  display: block;
  border-radius: 0.8rem;
  overflow: hidden;
  background:
    linear-gradient(45deg, color-mix(in srgb, #fff 7%, transparent) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, color-mix(in srgb, #fff 7%, transparent) 25%, transparent 25%) 0 0 / 14px 14px,
    color-mix(in srgb, #000 30%, var(--brand-bg));
}

.talent-product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease;
}

.talent-product-card__name {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.talent-product-card:hover,
.talent-product-card:focus-visible {
  border-color: color-mix(in srgb, var(--brand-neon) 60%, transparent);
  transform: translateY(-3px);
  outline: none;
}

.talent-product-card:hover img,
.talent-product-card:focus-visible img {
  transform: scale(1.04);
}

.talent-product-card.is-selected {
  border-color: var(--brand-neon);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--brand-neon) 40%, transparent),
    0 16px 36px rgba(0, 0, 0, 0.28);
}

/* ---- Studio layout: square stage + side tools rail ---- */
.talent-stage-wrap {
  margin-top: 0.85rem;
  animation: talentStudioReveal 0.55s ease both;
}

@keyframes talentStudioReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.talent-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1.15rem;
  align-items: start;
  justify-items: stretch;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.talent-tools-shell {
  order: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.4rem;
  width: 100%;
  max-width: min(100%, 56rem);
  margin-inline: auto;
  min-width: 0;
  flex-shrink: 0;
}

.talent-stage-column {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  align-self: stretch;
  padding-block: 0.15rem 0.35rem;
  overflow: visible;
  flex: 0 0 auto;
}

.talents-page.is-rtl .talent-tools-shell {
  order: 1;
}

.talents-page.is-rtl .talent-stage-column {
  order: 2;
}

.talent-tools-toggle {
  flex: 0 0 auto;
  z-index: 2;
  margin-top: 0.2rem;
}

.talent-tools-toggle.is-active {
  background: var(--brand-neon);
  color: #111;
}

.talent-studio-layout.is-tools-collapsed .talent-tools-column {
  width: 0;
  max-width: 0;
  min-width: 0;
  height: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  box-shadow: none;
}

.talent-stage {
  --stage-fit: 300px;
  container-type: size;
  position: relative;
  aspect-ratio: 1 / 1;
  width: var(--stage-fit);
  height: var(--stage-fit);
  max-width: none;
  max-height: none;
  min-width: var(--stage-fit);
  min-height: var(--stage-fit);
  box-sizing: border-box;
  margin-inline: auto;
  flex: 0 0 auto;
  border-radius: var(--talent-radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 38%, transparent);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px color-mix(in srgb, #fff 6%, transparent);
  background:
    linear-gradient(45deg, color-mix(in srgb, #fff 7%, transparent) 25%, transparent 25%) 0 0 / 18px 18px,
    linear-gradient(-45deg, color-mix(in srgb, #fff 7%, transparent) 25%, transparent 25%) 0 0 / 18px 18px,
    color-mix(in srgb, var(--brand-bg) 88%, #000);
  touch-action: none;
  user-select: none;
  --product-scale: 1;
  --product-rotate: 0deg;
}

body.talents-studio-open .talent-studio-layout {
  height: auto;
  max-height: none;
  min-height: 0;
  align-items: start;
  grid-template-rows: auto auto;
}

body.talents-studio-open .talent-stage {
  --stage-fit: 300px;
}

body.talents-studio-open .talent-stage-column {
  overflow: visible;
  height: auto;
  max-height: none;
  justify-content: flex-start;
}

.talent-stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.talent-stage-fill {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--stage-fill-1, #0b1020);
}

.talent-stage-fill.is-dual {
  background: linear-gradient(
    135deg,
    var(--stage-fill-1, #0b1020) 0%,
    var(--stage-fill-2, #b8ff3c) 100%
  );
}

.talent-bg-colors[hidden] {
  display: none !important;
}

.talent-stage-draw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  touch-action: none;
  display: block;
}

.talent-stage.is-pen-mode .talent-stage-draw {
  pointer-events: auto;
  z-index: 5;
  cursor: crosshair;
}

.talent-stage.is-pen-mode .talent-stage-product,
.talent-stage.is-pen-mode .talent-stage-product-model,
.talent-stage.is-pen-mode .talent-face-frame,
.talent-stage.is-pen-mode .talent-overlay-text {
  pointer-events: none;
}

.talent-pen-block {
  display: grid;
  gap: 0.4rem;
}

.talent-pen-options {
  display: grid;
  gap: 0.45rem;
}

.talent-pen-options[hidden] {
  display: none !important;
}

#talent-pen-toggle.is-active {
  background: var(--brand-neon);
  color: #111;
}

.talent-stage-product,
.talent-stage-product-model {
  position: absolute;
  left: var(--product-x, 50%);
  top: var(--product-y, 50%);
  /* Keep hit-box smaller than the stage so the face stays reachable */
  width: 58%;
  height: 58%;
  object-fit: contain;
  display: block;
  pointer-events: auto;
  z-index: 2;
  transform: translate(-50%, -50%) scale(var(--product-scale, 1)) rotate(var(--product-rotate, 0deg));
  transform-origin: center center;
  cursor: grab;
  touch-action: none;
}

.talent-stage-product-model {
  width: 58%;
  height: 58%;
  overflow: hidden;
  border-radius: 0.4rem;
  background: transparent;
}

.talent-stage-product.is-dragging,
.talent-stage-product-model.is-dragging {
  z-index: 8;
  cursor: grabbing;
}

.talent-stage-product-model[hidden],
.talent-stage-product[hidden] {
  display: none !important;
}

.talent-stage-product:active,
.talent-stage-product-model:active {
  cursor: grabbing;
}

.talent-product-card__media .store-model,
.talent-product-card__media .talent-product-model-badge {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand-bg, #0b1020) 72%, #111827);
  color: var(--brand-neon, #b8ff3c);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  border-radius: 0.55rem;
}

.talent-face-frame {
  position: absolute;
  left: var(--face-x);
  top: var(--face-y);
  width: calc(36% * var(--face-scale));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  outline: 1px dashed color-mix(in srgb, var(--brand-neon) 45%, transparent);
  outline-offset: 2px;
  cursor: grab;
  touch-action: none;
  z-index: 6;
  background: transparent;
  --face-star-clip: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  --face-star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='50,0 61,35 98,35 68,57 79,91 50,70 21,91 32,57 2,35 39,35' fill='%23000'/%3E%3C/svg%3E");
}

.talent-face-frame.is-circle {
  border-radius: 50%;
  clip-path: none;
  -webkit-clip-path: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.talent-face-frame.is-square {
  /* Real square frame (not a soft rounded “circle in a box”) */
  border-radius: 0.2rem;
  clip-path: none;
  -webkit-clip-path: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.talent-face-frame.is-square video,
.talent-face-frame.is-square canvas {
  border-radius: 0;
}

.talent-face-frame.is-star {
  border-radius: 0;
  overflow: hidden;
  outline: none;
  -webkit-clip-path: var(--face-star-clip);
  clip-path: var(--face-star-clip);
  -webkit-mask-image: var(--face-star-mask);
  mask-image: var(--face-star-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.talent-face-frame.is-star::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: 3;
  pointer-events: none;
  -webkit-clip-path: var(--face-star-clip);
  clip-path: var(--face-star-clip);
  border: 1.5px dashed color-mix(in srgb, var(--brand-neon) 55%, transparent);
  box-sizing: border-box;
}

.talent-face-frame:active,
.talent-face-frame.is-dragging {
  cursor: grabbing;
  outline-color: var(--brand-neon);
  outline-style: solid;
  z-index: 9;
}

.talent-face-frame video,
.talent-face-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
  pointer-events: none;
}

.talent-face-frame.is-star video,
.talent-face-frame.is-star canvas {
  border-radius: 0;
  -webkit-clip-path: var(--face-star-clip);
  clip-path: var(--face-star-clip);
  -webkit-mask-image: var(--face-star-mask);
  mask-image: var(--face-star-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.talent-face-frame video {
  transform: scaleX(-1);
  z-index: 1;
}

.talent-face-frame canvas {
  z-index: 2;
}

.talent-ico {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  flex-shrink: 0;
}

.talent-ico-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.45rem;
  min-height: 2.45rem;
  padding: 0;
  border-radius: 0.85rem;
  line-height: 0;
}

.talent-ico-btn.btn {
  width: 2.55rem;
  min-width: 2.55rem;
  height: 2.55rem;
  min-height: 2.55rem;
}

.talent-ico-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.talent-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.talent-shapes .chip {
  min-width: 2.45rem;
  justify-content: center;
}

.talent-field-ico {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
}

.talent-field-ico__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 28%, transparent);
  background: color-mix(in srgb, var(--brand-bg) 70%, #000);
  color: var(--brand-neon);
}

.talent-file-chip.talent-ico-btn {
  margin: 0;
}

.talent-overlay-text {
  position: absolute;
  left: var(--text-x, 50%);
  top: var(--text-y, 50%);
  transform: translate(-50%, -50%);
  z-index: 4;
  max-width: 88%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--overlay-text-size, 28px);
  line-height: 1.15;
  color: var(--text-color-1, #ffffff);
  background: linear-gradient(135deg, var(--text-color-1, #ffffff) 0%, var(--text-color-2, #b8ff3c) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: none;
  pointer-events: auto;
  cursor: move;
  user-select: none;
  word-break: break-word;
}

.talent-overlay-text:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.05);
}

.talent-overlay-text:empty {
  display: none;
}

.talent-stage-brand {
  position: absolute;
  right: clamp(0.45rem, 3.5cqmin, 0.85rem);
  bottom: clamp(0.4rem, 3.2cqmin, 0.8rem);
  z-index: 6;
  margin: 0;
  max-width: 72%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.68rem, 4.2cqmin, 1.05rem);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--brand-neon);
  text-shadow:
    0 0 14px color-mix(in srgb, var(--brand-neon) 45%, transparent),
    0 1px 3px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.talent-stage-brand.cms-text {
  color: inherit;
  font-size: calc(clamp(0.68rem, 4.2cqmin, 1.05rem) * var(--cms-size, 100) / 100);
  text-shadow:
    0 0 14px color-mix(in srgb, currentColor 45%, transparent),
    0 1px 3px rgba(0, 0, 0, 0.55);
}

.talent-tools-column {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  align-self: stretch;
  overflow: visible;
  padding: 0.45rem 0.55rem;
  border-radius: 0.95rem;
  border: 1px solid var(--talent-line);
  background: var(--talent-panel);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  transition:
    max-height 0.22s ease,
    opacity 0.18s ease,
    padding 0.22s ease;
}

body.talents-studio-open .talent-tools-column {
  max-height: none;
}

.talent-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}

.talent-tools-row--main {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--talent-line) 75%, transparent);
}

.talent-tools-row--extra {
  padding-top: 0.05rem;
}

.talent-tools-column > :last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.talent-capture-actions.talent-ico-row,
.talent-tools-column .talent-ico-row,
.talent-tools-column .talent-shapes,
.talent-tools-column .talent-scale-row,
.talent-tools-column .talent-filters,
.talent-tools-column .talent-form-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.talent-capture-actions .btn,
.talent-capture-actions .chip {
  justify-content: center;
  text-align: center;
  font-weight: 800;
}

.talent-tools-column .talent-ico-btn,
.talent-tools-column .talent-ico-btn.btn {
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
}

.talent-tools-column .talent-field-ico {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  width: auto;
  grid-template-columns: none;
}

.talent-tools-column .talent-field-ico__mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
}

.talent-tools-column .talent-color-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
  grid-template-columns: none;
}

.talent-tools-column .talent-color-field input[type="color"],
.talent-tools-column .talent-color-row input[type="color"] {
  width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  padding: 0.12rem;
  margin-inline: 0;
}

.talent-tools-column .talent-pen-options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.talent-tools-column .talent-text-size input[type="range"],
.talent-tools-column #talent-pen-size,
.talent-tools-column #talent-overlay-size,
.talent-tools-column #talent-stage-size {
  width: 7rem;
  max-width: 100%;
  writing-mode: horizontal-tb;
  direction: ltr;
}

.talent-tools-column .talent-overlay-inline {
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 16rem;
}

.talent-tools-column .talent-overlay-size,
.talent-tools-column .talent-stage-size {
  flex: 1 1 7rem;
  min-width: 6rem;
  max-width: 11rem;
}

.talent-tools-column .talents-subhead {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.2;
  text-align: center;
}

.talent-tools-column .talent-form {
  gap: 0.35rem;
}

.talent-tools-column .talent-form label span {
  font-size: 0.62rem;
}

.talent-tools-column .talent-form input {
  padding: 0.35rem 0.3rem;
  border-radius: 0.55rem;
  font-size: 0.72rem;
}

.talent-tools-column .talent-form .btn {
  width: 100%;
  justify-content: center;
  min-height: 2.2rem;
  padding-inline: 0.25rem;
  font-size: 0.72rem;
}

.talent-tools-column #talent-overlay-input {
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
  border-radius: 0.7rem;
}

.talent-tools-row .talent-edit-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.talent-tools-row .talent-edit-inline[hidden] {
  display: none !important;
}

.talent-send-panel {
  width: min(100%, 28rem);
  margin: 1.25rem auto 0;
  padding: 0.85rem 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--talent-line);
  background: var(--talent-panel);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  height: auto;
  max-height: none;
  overflow: visible;
}

.talent-send-panel .talents-subhead {
  margin: 0 0 0.55rem;
  text-align: center;
}

.talent-send-panel .talent-form {
  display: grid;
  gap: 0.65rem;
  height: auto;
  max-height: none;
  overflow: visible;
}

.talent-send-panel .talent-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}

.talent-send-panel .talent-form input {
  width: 100%;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 28%, transparent);
  background: color-mix(in srgb, var(--brand-bg) 82%, #000);
  color: inherit;
  padding: 0.7rem 0.85rem;
  font: inherit;
}

.talent-send-panel .talent-form-actions {
  display: flex;
  justify-content: center;
}

.talent-send-panel .talent-form .btn {
  width: 100%;
  justify-content: center;
}

/* Compact studio mode: hero off, picker becomes a strip */
body.talents-studio-open {
  overflow-x: auto;
  overflow-y: auto;
}

body.talents-studio-open .talents-gallery-section,
body.talents-studio-open .site-footer {
  display: none;
}

body.talents-studio-open .talents-main {
  gap: 0.65rem;
  padding-bottom: 0.75rem;
  width: min(1180px, calc(100% - 2 * var(--talent-pad)));
  max-width: 100%;
}

body.talents-studio-open .talents-studio-section {
  display: grid;
  grid-template-rows: auto auto;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
}

body.talents-studio-open .talent-stage-wrap {
  margin-top: 0.45rem;
  min-height: 0;
  overflow: visible;
  display: grid;
  grid-template-rows: auto auto;
  gap: 1.1rem;
  width: 100%;
}

body.talents-studio-open .talent-studio-layout {
  height: auto;
  max-height: none;
  min-height: 0;
  gap: 1.15rem;
  padding-bottom: 0.25rem;
  overflow: visible;
  width: 100%;
  justify-items: center;
}

body.talents-studio-open .talent-tools-shell {
  padding-bottom: 0.15rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
}

body.talents-studio-open .talent-send-panel {
  margin-top: 0;
  padding-top: 0.85rem;
  padding-bottom: 1rem;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
}

body.talents-studio-open .talent-send-panel .talent-form {
  height: auto;
  max-height: none;
  overflow: visible;
}

body.talents-studio-open .talent-pick-block {
  margin: 0;
}

body.talents-studio-open .talent-pick-block .talents-subhead {
  display: none;
}

body.talents-studio-open .talent-product-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

body.talents-studio-open .talent-product-card {
  flex: 0 0 auto;
  width: 4.6rem;
  scroll-snap-align: start;
}

body.talents-studio-open .talent-product-card__name {
  font-size: 0.68rem;
  line-height: 1.15;
}

body.talents-studio-open .talent-progress {
  margin-bottom: 0;
}

.talent-filters,
.talent-scale-row,
.talent-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.talent-filters .chip.is-active,
#talent-remove-bg.is-active,
#talent-bg-solid.is-active,
#talent-bg-dual.is-active {
  background: var(--brand-neon);
  color: #111;
}

.talent-face-scale .talent-style-filters {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  border: 0;
  width: auto;
  flex: 0 0 auto;
}

.talent-face-scale .talent-style-filters .talent-ico-btn.is-active {
  background: var(--brand-neon);
  color: #111;
}

.talent-file-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.talent-text-field {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  font-weight: 700;
}

.talent-text-field input[type="text"],
.talent-form input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 28%, transparent);
  background: color-mix(in srgb, var(--brand-bg) 82%, #000);
  color: inherit;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.talent-text-field input[type="text"]:focus,
.talent-form input:focus {
  outline: none;
  border-color: var(--brand-neon);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-neon) 22%, transparent);
}

.talent-text-size input[type="range"] {
  width: 100%;
}

.talent-color-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.talent-color-row input[type="color"] {
  width: 100%;
  height: 40px;
  min-height: 2.2rem;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 30%, transparent);
  border-radius: 0.65rem;
  cursor: pointer;
  background: transparent;
  padding: 0.15rem;
}

.talent-form {
  display: grid;
  gap: 0.8rem;
}

.talent-form label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
}

.talent-status {
  margin: 0;
  text-align: center;
  min-height: 1.1em;
  font-size: 0.82rem;
  color: var(--brand-neon);
  font-weight: 700;
  width: min(100%, 22rem);
  flex-shrink: 0;
  max-width: min(100%, var(--stage-fit, 100%));
}

.talent-status.is-error {
  color: #ff6b6b;
}

/* ---- Gallery ---- */
.talent-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(176px, 100%), 1fr));
  gap: 1rem;
}

.talent-card {
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid var(--talent-line);
  background: var(--talent-panel);
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
  animation: talentCardIn 0.55s ease both;
  animation-delay: calc(min(var(--talent-i, 0), 12) * 0.04s);
}

@keyframes talentCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.talent-card:hover,
.talent-card:focus-visible {
  border-color: color-mix(in srgb, var(--brand-neon) 55%, transparent);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  transform: translateY(-3px);
  outline: none;
}

.talent-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  display: block;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 14px 14px,
    rgba(0, 0, 0, 0.28);
}

.talent-card-meta {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem 0.85rem 0.95rem;
}

.talent-card-meta strong {
  font-size: 0.98rem;
}

.talent-card-meta span {
  color: var(--muted);
  font-size: 0.85rem;
}

.talent-like-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.talent-like-btn.is-liked {
  opacity: 0.8;
  cursor: default;
  background: color-mix(in srgb, var(--brand-neon) 35%, transparent);
}

.talent-like-dialog {
  border: 1px solid color-mix(in srgb, var(--brand-neon) 35%, transparent);
  border-radius: 1rem;
  padding: 1.1rem;
  background: var(--brand-bg);
  color: inherit;
  width: min(92vw, 360px);
}

.talent-like-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.talent-like-dialog input {
  width: 100%;
  margin: 0.7rem 0 1rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--brand-neon) 30%, transparent);
  background: color-mix(in srgb, var(--brand-bg) 85%, #000);
  color: inherit;
  padding: 0.7rem 0.85rem;
  font: inherit;
}

.main-nav a[aria-current="page"] {
  color: var(--brand-neon);
}

body[data-theme-mode="light"] .talents-page {
  --talent-panel: color-mix(in srgb, #ffffff 82%, var(--brand-primary) 18%);
}

/* CMS inline colors must win over theme defaults */
body[data-theme-mode="light"] .talents-hero-title:not(.cms-text) {
  color: #132033;
}

.talents-page .btn.neon.cms-text {
  color: inherit;
  font-size: calc(1rem * var(--cms-size, 100) / 100);
}

.talents-page .cms-text.cms-text--bold {
  font-weight: 800 !important;
}

.talents-page .cms-text.cms-text--italic {
  font-style: italic !important;
}

@media (max-width: 1100px) {
  .talent-tools-shell {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .talent-studio-layout {
    gap: 0.95rem;
    min-height: 0;
  }

  body.talents-studio-open .talent-stage-wrap {
    gap: 0.95rem;
  }

  body.talents-studio-open .talent-studio-layout {
    height: auto;
    max-height: none;
  }

  .talent-stage-column {
    position: static;
    max-width: none;
  }

  .talents-main,
  body.talents-studio-open .talents-main {
    width: min(1180px, calc(100% - 1.5rem));
    max-width: 100%;
  }

  body.talents-studio-open .talent-hint {
    display: none;
  }
}

@media (max-width: 720px) {
  .talents-hero {
    min-height: auto;
    padding-top: 1.6rem;
  }

  .talents-hero-title {
    max-width: 12ch;
  }

  .talent-progress {
    border-radius: 1rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.25rem;
    padding: 0.4rem;
  }

  .talent-progress li {
    font-size: 0;
    gap: 0;
    padding: 0.5rem 0.2rem;
  }

  .talent-progress li span {
    font-size: 0.75rem;
  }

  .talent-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(104px, 100%), 1fr));
  }

  .talent-studio-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
  }

  body.talents-studio-open .talents-studio-section {
    height: auto;
    max-height: none;
  }

  body.talents-studio-open .talent-studio-layout {
    height: auto;
    max-height: none;
  }

  .talent-stage-column {
    max-width: none;
    max-height: none;
    min-height: 0;
  }

  body.talents-studio-open .talent-send-panel {
    max-height: none;
    height: auto;
    overflow: visible;
    padding: 0.7rem 0.75rem 0.8rem;
  }

  .talent-tools-column {
    padding: 0.35rem 0.4rem;
  }

  .talent-tools-column .talent-ico-btn,
  .talent-tools-column .talent-ico-btn.btn {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 2.15rem;
    min-height: 2.15rem;
  }

  .talent-gallery {
    grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr));
  }
}

@media (max-width: 560px) {
  .talents-hero-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .talent-gallery {
    grid-template-columns: repeat(auto-fill, minmax(min(132px, 100%), 1fr));
  }

  .talent-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .talent-studio-layout {
    gap: 0.85rem;
  }

  body.talents-studio-open .talent-stage-wrap {
    gap: 0.85rem;
  }

  body.talents-studio-open .talent-send-panel {
    max-height: none;
    height: auto;
    overflow: visible;
    padding-top: 0.3rem;
  }

  .talent-tools-column {
    padding: 0.3rem;
    border-radius: 0.8rem;
  }

  .talent-tools-column .talent-overlay-inline {
    flex: 1 1 100%;
    max-width: none;
  }

  .talent-capture-actions.talent-ico-row {
    gap: 0.22rem;
  }

  .talent-ico-btn {
    width: 2.1rem;
    min-width: 2.1rem;
    height: 2.1rem;
    min-height: 2.1rem;
  }

  .talent-ico-btn.btn {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 2.15rem;
    min-height: 2.15rem;
  }

  .talents-section-head p {
    font-size: 0.92rem;
  }

  body.talents-studio-open .talent-product-card {
    width: 4.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .talents-atmosphere,
  .talents-hero,
  .talent-stage-wrap,
  .talent-card {
    animation: none !important;
  }

  .talent-product-card,
  .talent-card {
    transition: none;
  }
}
