@font-face { font-family: Figtree; src: url("assets/figtree-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Figtree; src: url("assets/figtree-700.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: Oswald; src: url("assets/oswald-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Barcelony; src: url("assets/Barcelony.otf") format("opentype"); font-display: swap; }
@font-face { font-family: Quinzey; src: url("assets/Quinzey.otf") format("opentype"); font-display: swap; }
@font-face { font-family: Hestecina; src: url("assets/Hestecica.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: Blackjar; src: url("assets/Blackjar.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Brittany Signature"; src: url("assets/BrittanySignature.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Wild Spirit"; src: url("assets/WildSpirit.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Golden Plains"; src: url("assets/GoldenPlainsDemo.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Romate Hood"; src: url("assets/RomateHood.otf") format("opentype"); font-display: swap; }
@font-face { font-family: Aileron; src: url("assets/Aileron-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Nickainley; src: url("assets/Nickainley-Normal.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("assets/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("assets/BebasNeue-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  --page: #1f1f21;
  --ink: #c5c5c7;
  --white: #fff;
  --acid: #e3fc02;
  --violet: #6157ff;
  --stage: #0c0d12;
  --line: #ffffff42;
  --error: #ffc4ae;
  font: 500 16px/1.55 Figtree, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); }
h1, p, fieldset { margin: 0; }
fieldset { min-width: 0; border: 0; padding: 0; }
button, input, select, textarea { font: inherit; }
button, input[type="range"] { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }
.tool-header, .builder { width: min(100%, 1640px); margin-inline: auto; }
.tool-header { padding: 25px 28px 20px 20px; }
.shop-name { color: var(--acid); font-size: 14px; font-weight: 700; }
.tool-header h1 {
  margin-top: 4px;
  color: var(--white);
  font: 500 clamp(25px, 3vw, 36px)/1.2 Oswald, "Arial Narrow", sans-serif;
}

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  align-items: start;
  gap: 32px;
  padding: 0 28px 42px 20px;
}
.preview { min-width: 0; position: sticky; top: 16px; }
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.42;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 45%, #ffffff14, transparent 36%), linear-gradient(135deg, #0c0d12, #17181f 55%, #0a0b10);
}
.sign {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 100%;
  z-index: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.sign.is-dragging { cursor: grabbing; }
.neon-text {
  color: #fff6c7;
  font: 500 46px/1.05 Barcelony, cursive;
  text-align: center;
  white-space: pre;
  transform: scaleY(var(--design-height-scale, 1));
  transform-origin: center top;
  text-shadow: 0 0 8px currentColor, 0 0 18px currentColor, 0 0 38px currentColor, 0 0 72px currentColor;
}
.sign-line { display: block; padding-inline: .08em; }
.neon-text[data-staggered] .sign-line:first-child { padding-right: .98em; }
.neon-text[data-staggered] .sign-line:last-child { padding-left: .98em; }
.dimension-line {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  color: var(--white);
  pointer-events: none;
  font-size: 14px;
  line-height: 1.1;
}
.dimension-line span { position: relative; z-index: 1; padding: 4px 6px; background: #111219; border-radius: 2px; white-space: nowrap; }
.dimension-line::before { content: ""; position: absolute; inset: 0; }
.dimension-width { left: -18px; right: -18px; height: 12px; top: calc(100% + 14px); }
.dimension-width::before { border-inline: 1px solid #ffffff6b; background: linear-gradient(#ffffff6b,#ffffff6b) center / 100% 1px no-repeat; }
.dimension-height {
  top: calc(-10px * var(--design-height-scale, 1));
  bottom: calc(-10px * var(--design-height-scale, 1));
  left: -61px;
  width: 12px;
}
.dimension-height::before { border-block: 1px solid #ffffff6b; background: linear-gradient(#ffffff6b,#ffffff6b) center / 1px 100% no-repeat; }
.dimension-height span { position: absolute; left: 14px; }
.preview-info { padding: 14px 8px 2px; text-align: center; font-size: 16px; letter-spacing: .025em; }
.preview-note { max-width: 54ch; margin: 4px auto 0; padding: 0 8px 6px; color: #c6c6cb; text-align: center; font-size: 13px; line-height: 1.45; }

.editor { min-width: 0; }
.step { margin-top: 18px; }
.step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  text-transform: uppercase;
  font-weight: 800;
}
.step-number { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 4px; background: var(--violet); color: white; }
.text-input {
  display: block;
  width: 100%;
  height: 100px;
  min-height: 100px;
  resize: vertical;
  border: 1px solid #ffffff6b;
  border-radius: 8px;
  padding: 16px 18px;
  color: #17181c;
  background: #f4f4f1;
  font: 500 18px/1.4 Consolas, "Courier New", monospace;
  text-align: center;
}
.text-input::placeholder { color: #68686a; opacity: 1; }
.text-input[aria-invalid="true"] { border-color: var(--error); }
.alignment { margin-top: 10px; }
.alignment legend { padding: 0; margin-bottom: 5px; letter-spacing: .015em; }
.alignment-options { display: flex; align-items: center; gap: 5px; }
.alignment-options button {
  min-height: 23px;
  padding: 1px 7px;
  border: 1px solid #b6b6b6;
  border-radius: 0;
  background: #efefef;
  color: black;
  font: 400 13px/1.25 Arial, sans-serif;
}
.alignment-options button[aria-pressed="true"] { border-color: #d4d6a8; background: #f1f2df; }
.font-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  border: 1px solid #ffffff47;
  border-radius: 5px;
  background: #0a0b10b8;
  color: var(--white);
  padding: 7px 10px;
  text-align: left;
  font-size: 13.5px;
}
.font-toggle::after {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-left: 9px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}
.font-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.font-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 1px 2px;
  max-height: 246px;
  overflow-y: auto;
}
.font-option {
  min-width: 0;
  min-height: 45px;
  border: 1px solid #ffffff35;
  border-radius: 4px;
  padding: 4px;
  background: #ffffff08;
  color: var(--white);
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}
.font-option:hover, .font-option[aria-pressed="true"] { border-color: var(--acid); background: #e3fc021a; }
.colors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px 4px;
  max-width: 350px;
}
.color-option {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 44px;
  cursor: pointer;
  color: #e2e2e3;
  text-align: center;
  font-size: 10px;
  line-height: 1.04;
  letter-spacing: .02em;
}
.color-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.color-swatch {
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid #ffffff40;
  border-radius: 3px;
  background: var(--swatch);
}
.color-option input:checked + .color-swatch { border-color: white; outline: 2px solid var(--violet); outline-offset: 2px; }
.color-option input:focus-visible + .color-swatch { outline: 2px solid var(--acid); outline-offset: 2px; }
.color-name { max-width: 100%; }
.size-step { margin-top: 20px; }
.width-slider {
  --width-progress: 0%;
  appearance: none;
  display: block;
  width: 100%;
  height: 27px;
  margin: 0;
  background: transparent;
}
.width-slider::-webkit-slider-runnable-track { height: 8px; border: 1px solid #777; border-radius: 5px; background: linear-gradient(to right,var(--acid) var(--width-progress),#424246 var(--width-progress)); }
.width-slider::-moz-range-track { height: 6px; border: 1px solid #777; border-radius: 5px; background: linear-gradient(to right,var(--acid) var(--width-progress),#424246 var(--width-progress)); }
.width-slider::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--acid); }
.width-slider::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--acid); }
.width-ticks { display: flex; justify-content: space-between; margin: -2px 8px 5px; min-height: 18px; font-size: 10px; }
.width-tick { position: relative; width: 1px; height: 3px; background: #858589; }
.width-tick span { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); }
.selected-size { font-weight: 700; margin-top: 5px; letter-spacing: .015em; }
.style-field { display: grid; gap: 6px; margin: 13px 0 14px; font-weight: 700; }
.style-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.auto-style { min-height: 36px; padding: 0 2px; border: 0; background: transparent; color: var(--acid); font-size: 13px; text-decoration: underline; }
.style-field select {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  color: var(--white);
  background: #101116;
  border: 1px solid #ffffff47;
  border-radius: 5px;
  cursor: pointer;
}
.text-guidance { display: grid; gap: 4px; margin-top: 8px; font-size: 13px; line-height: 1.45; }
#text-fit { color: var(--white); font-weight: 700; }
.text-format { color: #aaaab0; }
.size-notice { color: var(--error); }
.size-notice:empty { display: none; }
.suggest-size {
  justify-self: start;
  min-height: 40px;
  margin-top: 3px;
  padding: 6px 12px;
  border: 1px solid var(--acid);
  border-radius: 5px;
  background: transparent;
  color: var(--acid);
  font-weight: 700;
  text-align: left;
}
.suggest-size:hover { background: #e3fc021a; }
.handoff { display: grid; gap: 9px; scroll-margin-top: 15px; }
.etsy-button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 47px;
  padding: 10px;
  border: 1px solid var(--acid);
  border-radius: 0;
  text-align: center;
  font-size: 15px;
  letter-spacing: .045em;
}
.etsy-button { background: var(--acid); color: #1c2000; cursor: pointer; }
.etsy-button:hover:enabled { background: #edff66; }
.etsy-button:disabled { opacity: .72; cursor: not-allowed; }
.copy-text { width: 100%; padding: 8px 10px; border: 1px solid var(--line); color: var(--white); background: #151517; }
.copy-status:empty { display: none; }
.copy-status, .handoff-note { font-size: 12px; }
.copy-status { color: var(--acid); }
.handoff-note { color: #aaaab0; }
.etsy-dialog {
  width: min(430px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  max-width: none;
  padding: 20px;
  border: 1px solid #ffffff47;
  border-radius: 9px;
  background: #242427;
  color: var(--white);
}
.etsy-dialog::backdrop { background: #000b; }
.etsy-dialog h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.3; }
.etsy-selection { display: grid; gap: 10px; margin: 0 0 12px; padding: 12px; border: 1px solid #ffffff30; border-radius: 6px; background: #18181b; }
.etsy-selection dt { color: var(--ink); font-size: 12px; }
.etsy-selection dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; }
.etsy-dialog .copy-text { display: block; margin-top: 9px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.dialog-back {
  min-height: 47px;
  padding: 7px;
  border: 1px solid #ffffff47;
  background: transparent;
  color: var(--white);
  font-size: 14px;
}
.no-script { padding: 20px; }

@media (max-width: 1100px) {
  .builder { grid-template-columns: minmax(0, 1fr) minmax(320px, 38%); gap: 20px; }
}

@media (max-width: 779px) {
  .tool-header { padding: 17px 15px 14px; }
  .builder { grid-template-columns: minmax(0, 1fr); gap: 17px; padding: 0 15px 28px; }
  .preview { position: static; background: var(--page); }
  .preview-info { padding: 8px 2px 6px; font-size: 12px; }
  .stage { aspect-ratio: auto; height: clamp(150px, 45vw, 200px); }
  .step { margin-top: 17px; }
  .font-options { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 205px; }
  .text-input { height: 84px; min-height: 84px; padding-block: 12px; }
  .alignment-options button { flex: 1; min-height: 44px; }
  .auto-style { min-height: 44px; }
  .etsy-dialog { padding: 15px; }
  .font-toggle, .style-field select, .suggest-size, .width-slider { min-height: 44px; }
}

@media (max-width: 779px) and (min-height: 600px) {
  .preview { position: sticky; top: 0; z-index: 3; padding-top: 7px; }
  .editor :is(input, textarea, button, select, a) { scroll-margin-top: 250px; }
}
