:root {
  --deep: #020b15;
  --navy: #06182e;
  --panel: #071b31;
  --cyan: #60d7ff;
  --pink: #ff167d;
  --white: #f7fbff;
  --muted: #9db5c8;
  --line: rgba(96, 215, 255, .24);
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  --radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 12%, rgba(96, 215, 255, .18), transparent 28%),
    linear-gradient(135deg, #020b15 0%, #06182e 58%, #020b15 100%);
  color: var(--white);
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.studio-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(2, 11, 21, .98), rgba(6, 24, 46, .96));
  box-shadow: 18px 0 60px rgba(0, 0, 0, .22);
  overflow-y: auto;
  overflow-x: hidden;
}

.brand {
  display: inline-flex;
  width: 138px;
  min-height: 44px;
  align-items: center;
}

.brand img {
  width: 100%;
  height: auto;
  display: block;
}

.panel-heading h1,
.stage-header h2,
.concept-footer h3 {
  margin: 0;
  font-family: "Arial Narrow", Impact, Arial, sans-serif;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .9;
  text-transform: uppercase;
}

.panel-heading h1 {
  max-width: 310px;
  font-size: clamp(40px, 4vw, 58px);
}

.panel-heading p {
  max-width: 320px;
  margin: 18px 0 0;
  color: #c8d8e4;
  font-size: 14px;
  line-height: 1.6;
}

.eyebrow {
  display: block;
  color: var(--pink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.quick-start {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 22, 125, .42);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 22, 125, .14), rgba(96, 215, 255, .07));
}

.quick-start h2 {
  margin: 5px 0 4px;
  font-size: 17px;
}

.quick-start p,
.browser-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.baked-logo-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.quick-start .primary-action {
  width: 100%;
}

.workflow-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-track li {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .7px;
  text-align: center;
  text-transform: uppercase;
}

.workflow-track span {
  display: grid;
  width: 100%;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(96, 215, 255, .24);
  border-radius: 4px;
  background: rgba(96, 215, 255, .06);
  color: var(--cyan);
}

.control-block {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.control-block.compact {
  padding-top: 15px;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.control-label span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.control-label h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.style-card {
  min-height: 148px;
  padding: 8px;
  border: 1px solid rgba(96, 215, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.style-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 215, 255, .55);
}

.style-card.active {
  border-color: var(--cyan);
  background: rgba(96, 215, 255, .12);
}

.style-card b {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}

.style-card img {
  display: block;
  width: 100%;
  height: 88px;
  margin: 0 0 8px;
  border-radius: 5px;
  background: #edf4f8;
  object-fit: contain;
  object-position: center;
}

.style-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.colour-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.colour-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.colour-controls output {
  margin-left: auto;
  color: var(--cyan);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .7px;
}

.colour-controls input {
  width: 100%;
  height: 46px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
}

.palette-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.palette-preset {
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(96, 215, 255, .2);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  cursor: pointer;
}

.palette-preset:hover,
.palette-preset.active {
  border-color: var(--cyan);
  color: #fff;
}

.palette-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 22px;
  overflow: hidden;
  margin-bottom: 5px;
  border-radius: 4px;
}

.palette-preset small {
  display: block;
  overflow: hidden;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .5px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.text-button {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
}

.text-input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 0 14px;
  border: 1px solid rgba(96, 215, 255, .35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.identity-controls,
.logo-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  align-items: end;
  margin-top: 4px;
  color: #dceaf4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.identity-controls label,
.logo-controls label {
  display: grid;
  gap: 7px;
}

.logo-controls label:first-child {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
}

.visibility-toggle {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  color: #dceaf4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.visibility-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--cyan);
}

.contrast-notice {
  display: none;
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.contrast-notice.good,
.contrast-notice.warning {
  display: block;
}

.auto-fix-button {
  width: 100%;
  min-height: 36px;
  margin-top: 7px;
  border: 1px solid rgba(255, 224, 138, .45);
  border-radius: 5px;
  background: rgba(255, 193, 7, .12);
  color: #ffe08a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
}

.contrast-notice.good {
  background: rgba(96, 215, 255, .1);
  color: #bfeeff;
}

.contrast-notice.warning {
  border: 1px solid rgba(255, 193, 7, .3);
  background: rgba(255, 193, 7, .1);
  color: #ffe08a;
}

.fine-tune {
  margin-top: 8px;
  border-top: 1px solid rgba(96, 215, 255, .16);
}

.fine-tune summary {
  padding: 10px 0 2px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
}

.fine-tune[open] summary {
  margin-bottom: 8px;
}

.identity-controls input[type="color"] {
  width: 100%;
  height: 38px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
}

.identity-controls select {
  min-height: 38px;
  width: 100%;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
  color: #f7fbff;
  font: inherit;
}

.logo-controls select {
  min-height: 38px;
  width: 100%;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
  color: #f7fbff;
  font: inherit;
}

.logo-quality {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.logo-quality.warning {
  color: #ffe08a;
}

.logo-treatment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid rgba(96, 215, 255, .2);
  border-radius: 6px;
}

.logo-treatment button {
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.logo-treatment button.active {
  background: var(--cyan);
  color: var(--navy);
}

.logo-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid rgba(96, 215, 255, .24);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
}

.logo-slots button {
  min-height: 33px;
  padding: 4px 5px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
}

.logo-slots button.active {
  background: var(--cyan);
  color: var(--navy);
}

.logo-adjustments {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.logo-adjustments label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.logo-adjustments output {
  color: #f7fbff;
  font-variant-numeric: tabular-nums;
}

.logo-adjustments input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--cyan);
}

.logo-tuning {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-top: 10px;
}

.logo-tuning label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.logo-tuning output {
  color: #f7fbff;
  font-variant-numeric: tabular-nums;
}

.logo-tuning input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--cyan);
}

.logo-adjustment-actions {
  display: flex;
  gap: 10px;
}

.logo-copy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 12px;
}

.logo-copy-actions #clearLogo {
  grid-column: 1 / -1;
}

.logo-copy-actions .text-button {
  margin: 0;
  font-size: 10px;
  text-align: left;
}

.logo-adjustment-actions .text-button {
  margin: 0;
  white-space: nowrap;
}

.logo-adjustment-actions .text-button.active {
  color: var(--pink);
}

.logo-controls input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #60d7ff;
}

.concept-checklist {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.concept-checklist li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.concept-checklist li::before {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--muted);
  content: "?";
  font-size: 10px;
  font-weight: 900;
  line-height: 15px;
  text-align: center;
}

.concept-checklist li.good::before {
  background: var(--cyan);
  color: var(--navy);
  content: "✓";
}

.concept-checklist li.warning::before {
  background: #ffe08a;
  color: var(--navy);
  content: "!";
}

.text-tuning {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.text-tuning label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.text-tuning output {
  min-width: 30px;
  color: #f7fbff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.text-tuning input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--cyan);
}

.upload-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(96, 215, 255, .42);
  border-radius: var(--radius);
  background: rgba(96, 215, 255, .08);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.colour-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #dceaf4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.colour-link input {
  width: 15px;
  height: 15px;
  accent-color: #60d7ff;
}

.base-design-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.base-thumb {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  padding: 0;
  border: 1px solid rgba(96, 215, 255, .24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
}

.base-thumb.active {
  border-color: var(--pink);
  box-shadow: 0 0 0 1px var(--pink) inset;
}

.base-thumb img {
  display: block;
  width: 100%;
  height: 58px;
  object-fit: cover;
}

.base-thumb span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(96, 215, 255, .24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .035);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
}

.segmented button.active {
  background: var(--cyan);
  color: var(--navy);
}

.overlay-mode {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-content: start;
  min-width: 0;
  height: 100vh;
  padding: 24px;
  overflow: hidden;
}

.stage,
.preview-card,
.concept-strip {
  min-width: 0;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.stage-header p {
  margin: 0 0 12px;
  color: var(--pink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.stage-header h2 {
  color: #fff;
  font-size: clamp(38px, 4.5vw, 66px);
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}

.primary-action {
  background: var(--pink);
  color: #fff;
}

.secondary-action {
  border-color: rgba(96, 215, 255, .42);
  background: rgba(96, 215, 255, .08);
  color: #fff;
}

.secondary-action.dark {
  background: var(--navy);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.compact-action {
  min-width: 76px;
  padding: 0 12px;
}

.secondary-action:disabled {
  opacity: .4;
  cursor: default;
  transform: none;
}

.preview-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border: 1px solid rgba(96, 215, 255, .24);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(229, 241, 248, .96)),
    #f7fbff;
  color: var(--navy);
  box-shadow: var(--shadow);
  height: 100%;
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 24, 46, .08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(6, 24, 46, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 72%);
  pointer-events: none;
}

.preview-meta {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 24px;
  display: flex;
  gap: 8px;
}

.preview-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(6, 24, 46, .1);
  color: #38516a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.preview-meta span:first-child {
  background: var(--navy);
  color: #fff;
}

.view-controls {
  position: absolute;
  z-index: 3;
  top: 22px;
  right: 24px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(6, 24, 46, .12);
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(6, 24, 46, .1);
}

.view-controls button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #38516a;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.view-controls button.active {
  background: var(--navy);
  color: #fff;
}

.background-controls {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: 18px;
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(6, 24, 46, .12);
  border-radius: 6px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(6, 24, 46, .1);
}

.background-controls button {
  min-height: 25px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #38516a;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.background-controls button.active {
  background: var(--navy);
  color: #fff;
}

.preview-card[data-background="grey"] {
  background: linear-gradient(135deg, #d5dbe0, #aeb8c2);
}

.preview-card[data-background="dark"] {
  background: linear-gradient(135deg, #06182e, #020b15);
}

.preview-card[data-background="dark"]::before {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(0deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
}

.jersey-stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100%;
  place-items: start center;
  padding: 44px 24px 10px;
  perspective: 1400px;
  user-select: none;
}

.model-wrap {
  width: min(100%, 1500px);
  min-height: min(78vh, 1280px);
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
}

.model-wrap:active {
  cursor: grabbing;
}

.real-model {
  width: min(92vw, 1500px);
  height: min(78vh, 1280px);
  min-height: 500px;
}

.three-mount {
  position: relative;
  width: 100%;
  height: 100%;
}

.three-mount canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.model-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.model-fallback svg {
  width: min(76%, 340px);
  height: auto;
  filter: drop-shadow(0 22px 30px rgba(6,24,46,.22));
}

.model-fallback.hidden {
  display: none;
}

.model-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #38516a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
}

.model-loading::after {
  content: "";
  position: absolute;
  top: calc(50% + 24px);
  width: 150px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(96, 215, 255, .15), var(--cyan), rgba(96, 215, 255, .15));
  background-size: 200% 100%;
  animation: model-loading 1.2s linear infinite;
}

@keyframes model-loading {
  to { background-position: -200% 0; }
}

.jersey-model {
  position: relative;
  width: min(64vw, 370px);
  aspect-ratio: 520 / 640;
  transform-style: preserve-3d;
  transition: transform .16s ease-out;
}

.model-panel {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.model-panel.front {
  transform: translateZ(28px);
}

.model-panel.back {
  transform: rotateY(180deg) translateZ(28px);
}

.model-side {
  display: none;
}

.model-shadow {
  position: absolute;
  bottom: -22px;
  left: 50%;
  width: 82%;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(6,24,46,.24), transparent 72%);
  transform: translateX(-50%) rotateX(72deg) translateZ(-56px);
}

.model-hint {
  margin-top: 12px;
  color: #38516a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2.4px;
  text-align: center;
  text-transform: uppercase;
}

.model-panel svg,
.concept-option svg {
  display: block;
  width: 100%;
  height: auto;
}

.model-panel svg {
  filter: drop-shadow(0 26px 34px rgba(6, 24, 46, .2));
}

.preview-caption {
  margin-top: -6px;
  color: #38516a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
}

.concept-footer {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding-top: 2px;
}

.shortlist {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-top: 16px;
}

.shortlist h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.shortlist-items {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.shortlist-item {
  position: relative;
  min-width: 126px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(96, 215, 255, .36);
  border-radius: 6px;
  background: #06182e;
  color: #fff;
  cursor: pointer;
}

.shortlist-item img {
  display: block;
  width: 126px;
  height: 76px;
  object-fit: cover;
}

.shortlist-item span {
  display: block;
  padding: 6px 8px;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.concept-footer h3 {
  color: #fff;
  font-size: clamp(26px, 2.6vw, 38px);
}

.concept-footer p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.concept-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
}

.concept-option {
  position: relative;
  min-height: 96px;
  min-width: 142px;
  overflow: hidden;
  border: 1px solid rgba(96, 215, 255, .2);
  border-radius: var(--radius);
  background: #f7fbff;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}

.concept-option:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

.concept-option.active {
  border-color: var(--pink);
}

.concept-option span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.concept-option svg {
  max-height: 92px;
  object-fit: contain;
}

.concept-option img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: contain;
  object-position: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 340px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-finish-bar {
  display: none;
}

.enquiry-dialog {
  width: min(680px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(96, 215, 255, .3);
  border-radius: 8px;
  background: var(--panel);
  color: #fff;
  box-shadow: var(--shadow);
}

.enquiry-dialog::backdrop {
  background: rgba(2, 11, 21, .76);
}

.enquiry-dialog form {
  padding: 24px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dialog-heading p {
  margin: 0 0 6px;
  color: var(--pink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dialog-heading h2 {
  margin: 0;
  font-family: "Arial Narrow", Impact, Arial, sans-serif;
  font-size: 38px;
  font-style: italic;
  line-height: .95;
  text-transform: uppercase;
}

.dialog-close {
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.enquiry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.enquiry-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.enquiry-grid .wide {
  grid-column: 1 / -1;
}

.enquiry-grid input,
.enquiry-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(96, 215, 255, .25);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  resize: vertical;
}

.enquiry-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.handoff-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(96, 215, 255, .24);
  border-radius: 6px;
  background: rgba(96, 215, 255, .06);
}

.handoff-panel strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
}

.handoff-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.handoff-panel .privacy-line {
  margin-top: 10px;
  font-size: 10px;
}

.privacy-line a {
  color: var(--cyan);
  font-weight: 800;
}

.mobile-editor {
  width: min(620px, 100vw);
  max-height: min(760px, 92dvh);
  margin: auto 0 0;
  padding: 0;
  border: 1px solid rgba(96, 215, 255, .3);
  border-radius: 12px 12px 0 0;
  background: var(--panel);
  color: #fff;
  box-shadow: 0 -18px 48px rgba(0, 0, 0, .42);
}

.mobile-editor::backdrop {
  background: rgba(2, 11, 21, .72);
}

.mobile-editor-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
}

.mobile-editor-header h2 {
  margin: 4px 0 0;
  font-family: "Arial Narrow", Impact, Arial, sans-serif;
  font-size: 28px;
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
}

.mobile-editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.mobile-editor-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, .055);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-editor-tabs button.active {
  background: var(--cyan);
  color: var(--navy);
}

.mobile-edit-panel {
  display: none;
  max-height: 56dvh;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.mobile-edit-panel.active {
  display: grid;
  gap: 12px;
}

.mobile-edit-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-edit-panel > label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.mobile-edit-panel input[type="text"],
.mobile-edit-panel select {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(96, 215, 255, .25);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
}

.mobile-style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.mobile-style-grid .style-card {
  min-height: 0;
}

.mobile-colour-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mobile-colour-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-colour-controls input {
  width: 100%;
  height: 44px;
}

.mobile-palette-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.mobile-palette-presets .palette-preset small {
  display: none;
}

.mobile-logo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-logo-actions .secondary-action {
  width: auto;
  min-height: 42px;
  padding: 0 8px;
  font-size: 9px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 1080px) {
  .studio-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .studio-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .stage-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .stage-actions {
    justify-content: flex-start;
  }

  .stage {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .studio-panel {
    display: none;
  }

  .stage {
    padding: 20px;
    padding-bottom: 82px;
  }

  .concept-footer {
    grid-template-columns: 1fr;
  }

  .concept-strip {
    display: flex;
  }

  .colour-controls {
    grid-template-columns: 1fr;
  }

  .stage-actions { width: 100%; }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .preview-meta {
    position: static;
    padding: 16px 16px 0;
    flex-wrap: wrap;
  }

  .view-controls {
    position: static;
    margin: 10px 16px 0;
    overflow-x: auto;
  }

  .background-controls {
    position: static;
    width: max-content;
    margin: 0 16px 10px;
  }

  .view-controls button {
    flex: 1 0 auto;
  }

  .jersey-stage {
    padding: 16px 10px 20px;
  }

  .model-wrap {
    min-height: 420px;
  }

  .jersey-model {
    width: min(88vw, 330px);
  }

  .real-model {
    width: min(92vw, 390px);
    height: 430px;
    min-height: 390px;
  }

  .preview-caption {
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .mobile-finish-bar {
    position: fixed;
    z-index: 15;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 6px;
    padding: 9px max(12px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid rgba(96, 215, 255, .24);
    background: rgba(2, 11, 21, .96);
  }

  .mobile-finish-bar button {
    min-height: 44px;
    border: 1px solid rgba(96, 215, 255, .35);
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mobile-finish-bar button:last-child {
    border-color: var(--pink);
    background: var(--pink);
  }

  .stage-actions .compact-action,
  .stage-actions #generateButton {
    display: none;
  }

  .stage-actions #downloadButton {
    display: none;
  }

  .stage-actions #sendButton {
    display: none;
  }

  .shortlist {
    grid-template-columns: 1fr;
  }

  .shortlist h3 {
    font-size: 18px;
  }

  .enquiry-grid {
    grid-template-columns: 1fr;
  }

  .enquiry-grid .wide {
    grid-column: auto;
  }

  .dialog-actions > * {
    flex: 1;
  }
}

@media (min-width: 721px) {
  .mobile-editor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
