* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #101012; color: #f6f5f4; }
body { margin: 0; }
@media (min-width: 1340px) {
  body { isolation: isolate; }
  body::before, body::after {
    content: '';
    position: fixed;
    inset-block: 0;
    width: max(0px, calc((100% - 1244px) / 2));
    z-index: -1;
    pointer-events: none;
    background:
      linear-gradient(165deg, transparent 22%, #7b1c25 22.4% 22.9%, transparent 23.3% 25%, #401d24 25.4% 26.7%, transparent 27.1%),
      linear-gradient(165deg, transparent 73%, #4b1e25 73.4% 74.1%, transparent 74.5% 75.4%, #68212a 75.8% 76.2%, transparent 76.6%),
      conic-gradient(from 90deg, #1b1b20 25%, #121216 0 50%, #1b1b20 0 75%, #121216 0) 0 0 / 46px 46px;
    mask-image: linear-gradient(to right, #000c, #0007 62%, transparent);
  }
  body::before { inset-inline-start: 0; }
  body::after { inset-inline-end: 0; transform: scaleX(-1); }
}
[hidden] { display: none !important; }
header { display: flex; align-items: center; gap: 16px; min-height: 65px; padding: 12px max(18px, calc((100% - 1244px) / 2)); border-bottom: 1px solid #303035; background: #17171a; }
.brand-logo { display: block; width: clamp(104px, 35vw, 148px); height: auto; flex-shrink: 0; }
.divider { height: 27px; border-inline-start: 1px solid #49494d; flex-shrink: 0; }
h1 { font-size: 16px; font-weight: 600; margin: 0; }
main { max-width: 1280px; margin: 24px auto; padding: 0 18px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.designer-intro { grid-column: 1 / -1; position: relative; border-radius: 12px; overflow: hidden; background: #19191d; }
.designer-intro img { display: block; width: 100%; height: auto; }
.banner-upload { position: absolute; left: 68%; bottom: 7.1%; width: 26.4%; height: 12.9%; min-height: 44px; padding: 0; border: 0; border-radius: 9px; background: transparent; }
.banner-upload:hover { background: #ffffff1a; }
.garment-picker { grid-column: 1 / -1; display: flex; }
.garment-picker .segments button { min-width: 106px; min-height: 44px; padding: 8px 18px; font-size: 16px; }
.preview, .controls { border: 1px solid #34343a; border-radius: 14px; background: #19191d; overflow: hidden; }
.preview-bar { display: grid; gap: 10px; padding: 14px 16px; }
.preview-bar small { display: block; color: #bcbcc3; margin-top: 2px; }
.shirt-colors { min-width: 0; border: 0; margin: 0; padding: 0 16px 12px; }
.shirt-colors legend { padding: 0; margin-bottom: 5px; font-size: 13px; font-weight: 650; }
.shirt-swatches { display: flex; gap: 3px; flex-wrap: wrap; }
.shirt-swatch { display: grid; place-items: center; width: 34px; height: 34px; padding: 4px; border: 1px solid transparent; border-radius: 50%; background: transparent; }
.shirt-swatch::before { content: ''; width: 100%; height: 100%; border: 1px solid #a09da6; border-radius: 50%; background: var(--shirt-color); }
.shirt-swatch[aria-checked="true"] { border-color: #d5ff00; }
.segments { display: flex; padding: 3px; background: #101012; border: 1px solid #3a3a40; border-radius: 9px; }
button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; font-weight: 650; }
.segments button { border: 0; background: transparent; border-radius: 6px; padding: 7px 13px; }
.segments button[aria-pressed="true"] { background: #f5f4f2; color: #151518; }
.preview-side-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; }
.preview-side-controls button { min-height: 50px; padding: 8px 12px; background: #252529; font-size: clamp(17px, 2vw, 21px); font-weight: 750; }
.preview-side-controls button[aria-pressed="true"] { background: #d5ff00; color: #17171a; }
.preview-viewport { width: min(100%, 600px, max(345px, calc(75svh - 145px))); margin-inline: auto; aspect-ratio: 3 / 4; overflow: hidden; }
.preview-viewport.is-zoomed { overflow: auto; overscroll-behavior: contain; }
.preview-stage { width: calc(var(--preview-width, 100%) * var(--preview-zoom, 1)); height: calc(var(--preview-height, 100%) * var(--preview-zoom, 1)); }
.mockup { width: var(--preview-width, 100%); height: var(--preview-height, 100%); position: relative; transform: scale(var(--preview-zoom, 1)); transform-origin: top left; background: #202020 url("mockup.png") left center / 200% 100% no-repeat; }
.mockup[data-side="back"] { background-position: right center; }
.mockup[data-garment="hoodie"] { background-color: #202024; }
.print-area { position: absolute; container-type: inline-size; overflow: hidden; touch-action: none; isolation: isolate; }
.print-area::after { position: absolute; inset: 0; content: ""; border: 1px dashed #ffffffb5; pointer-events: none; }
.print-area.hide-guide::after { display: none; }
.layer { position: absolute; display: grid; place-items: center; transform: translate(-50%, -50%); cursor: grab; touch-action: none; user-select: none; padding: 0; border: none; background: transparent; max-height: 100%; text-align: center; }
.layer:active { cursor: grabbing; }
.print-area:not(.hide-guide) .layer.selected { outline: 1px solid #ff7a70; outline-offset: -1px; }
.layer canvas, .layer img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; pointer-events: none; }
.layer.image-layer { overflow: hidden; }
.image-layer img { position: absolute; max-width: none; max-height: none; object-fit: fill; }
#resetCrop:disabled { opacity: .48; cursor: default; }
.preview-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.guides { display: flex; gap: 7px; align-items: center; font-size: 13px; }
.preview-zoom { display: flex; align-items: center; gap: 4px; }
.preview-zoom button { min-width: 34px; min-height: 34px; padding: 4px 7px; border: 1px solid #55555e; border-radius: 7px; background: #242429; }
.preview-zoom button:disabled { opacity: .48; cursor: default; }
#zoomFit { min-width: 58px; font-size: 13px; font-variant-numeric: tabular-nums; }
.controls { padding: 19px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title h2 { font-size: 23px; margin: 0; }
.section-title span { font-size: 12px; color: #ff9d96; }
.control-section { border-top: 1px solid #393940; margin-top: 17px; padding-top: 15px; }
.control-section h3 { font-size: 17px; line-height: 1.3; margin: 0 0 10px; }
.design-tools { border: 1px solid #393940; border-radius: 7px; padding: 9px 10px; margin: 9px 0; font-size: 13px; }
.design-tools:last-child { margin-bottom: 0; }
.design-tools summary { cursor: pointer; font-weight: 650; }
.ai-steps { display: grid; gap: 7px; padding-inline-start: 22px; color: #d6d6dc; line-height: 1.5; }
.ai-steps strong { color: #f6f5f4; }
.design-tools a { color: #d5ff00; }
.ai-example { margin: 8px 0; padding: 8px 11px; border-inline-start: 2px solid #778642; background: #25252a; line-height: 1.5; }
#imageQuality.low-resolution { color: #ffb092; }
.field { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; min-width: 0; }
#pilotAccessField[hidden] { display: none; }
#designNote { color-scheme: light; background: #fff; color: #17171a; border-color: #ddd; }
#designNote::placeholder { color: #62626b; }
select, textarea { width: 100%; background: #111114; border: 1px solid #46464f; border-radius: 7px; padding: 9px; }
textarea { resize: vertical; }
.actions, .paired { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.upload-actions { grid-template-columns: 1fr; }
.actions button, .remove { padding: 9px 7px; border-radius: 7px; border: 1px solid #575762; background: #242429; }
.actions button:first-child { background: #ff6359; color: #171014; border-color: #ff6359; }
.layer-order { margin-bottom: 9px; }
.layer-order button:first-child { background: #242429; color: inherit; border-color: #575762; }
.layer-order button:disabled { opacity: .45; cursor: default; }
.control-value { float: right; color: #c2c2ca; font-variant-numeric: tabular-nums; }
.actions button:hover, .remove:hover { filter: brightness(1.18); }
.add-to-cart {
  display: block;
  width: 100%;
  min-height: 60px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid #d4ff00;
  border-radius: 9px;
  background: #d4ff00;
  color: #141414;
  font-size: 20px;
  font-weight: 800;
}
.add-to-cart:hover:not(:disabled) { background: #e2ff59; }
.add-to-cart:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.add-to-cart:disabled { opacity: .65; }
.hint { color: #c2c2ca; font-size: 12px; line-height: 1.45; }
.session-note { margin: 16px 0 10px; }
.production-tools { padding: 10px 12px; border: 1px solid #393940; border-radius: 8px; font-size: 13px; color: #c2c2ca; }
.production-tools summary { cursor: pointer; }
.production-tools .export { width: 100%; color: #f6f5f4; }
.export:disabled { opacity: .5; cursor: default; }
.pricing input { width: 100%; min-width: 0; padding: 8px; color: inherit; background: #111114; border: 1px solid #46464f; border-radius: 7px; font: inherit; }
.size-picker { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.size-picker .field { font-weight: 600; }
.size-picker legend { font-size: 13px; padding: 0; }
.shirt-size-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.shirt-size-grid .field { margin: 5px 0 0; }
.quote { display: grid; gap: 6px; min-height: 50px; margin-bottom: 13px; padding: 12px 14px; background: #171c11; border: 1px solid #545d35; border-radius: 8px; font-size: 13px; }
.quote strong { padding-bottom: 6px; border-bottom: 1px solid #444c2d; color: #d5ff00; font-size: clamp(18px, 2.1vw, 23px); font-variant-numeric: tabular-nums; }
.pricing details { margin-top: 12px; font-size: 13px; }
.pricing summary { cursor: pointer; }
.pricing table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pricing caption { text-align: left; color: #c2c2ca; margin-bottom: 5px; }
.pricing th, .pricing td { text-align: right; padding: 5px; border-bottom: 1px solid #393940; }
.pricing th:first-child { text-align: left; }
.pricing tr.active { background: #393036; }
#error, #exportError { color: #ffaaa4; font-size: 13px; }
input { accent-color: #ff6359; }
input[type="range"] { width: 100%; margin: 0; }
input[type="color"] { width: 100%; height: 37px; border: 1px solid #46464f; border-radius: 7px; background: #111114; }
.check { font-size: 13px; }
:focus-visible { outline: 2px solid #ffaaa4; outline-offset: 2px; }
@media (min-width: 801px) and (min-height: 680px) { .preview { position: sticky; top: 12px; } }
@media (max-width: 800px) {
  main { grid-template-columns: minmax(0, 1fr); margin-block: 12px; gap: 12px; }
  .preview-viewport { width: min(100%, 390px); }
  .preview-zoom { display: none; }
}
@media (max-width: 420px) {
  main { padding-inline: 10px; }
  .controls { padding: 14px; }
  .preview-bar { padding-inline: 12px; }
  .shirt-swatch { width: 38px; height: 38px; }
  .upload-actions button, #addText { min-height: 44px; }
}
