:root {
  --ink: #11172a;
  --muted: #5f6b82;
  --paper: #ffffff;
  --soft: #f5f7fc;
  --panel: #ffffff;
  --line: #dfe4ef;
  --purple: #7a39ff;
  --blue: #0968ff;
  --accent: #6d3df5;
  --lime: #a8ffdc;
  --shirt: #171717;
  --shadow: 0 24px 70px rgba(41, 50, 82, .12);
}

/* Desktop creator workspace -------------------------------------------------
   Keep the phone/tablet experience as a stacked editor while using the extra
   desktop width for a true three-part application layout. */
@media (min-width: 981px) {
  body:has(.hero.workflow-active.editor-open) {
    overflow: hidden;
    background: #f5f7fc;
  }

  body:has(.hero.workflow-active.editor-open) .site-header {
    width: 100%;
    max-width: none;
    min-height: 60px;
    padding: 8px 24px;
  }

  .hero.workflow-active.editor-open {
    height: calc(100dvh - 60px);
    min-height: 0;
    padding: 10px 14px;
    overflow: hidden;
  }

  .hero.workflow-active.editor-open .maker-shell {
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    max-width: 980px;
    height: 100%;
    min-height: 0;
    border-radius: 18px;
  }

  .hero.workflow-active.editor-open .workspace-header {
    min-height: 56px;
    padding: 9px 16px;
    gap: 12px;
  }

  .hero.workflow-active.editor-open .workspace-header h2 {
    font-size: clamp(19px, 1.55vw, 24px);
  }

  .hero.workflow-active.editor-open .preview-panel {
    grid-template-columns: 96px minmax(0, 1fr) 0;
    grid-template-rows: 44px minmax(0, 1fr) 50px;
    grid-template-areas:
      "toolbar toolbar toolbar"
      "dock stage stage"
      "dock action action";
    column-gap: 12px;
    row-gap: 10px;
    height: 100%;
    min-height: 0;
    padding: 10px 12px 12px;
    overflow: hidden;
    transition: grid-template-columns .2s ease;
  }

  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-columns: 96px minmax(420px, 1fr) minmax(330px, 380px);
    grid-template-areas:
      "toolbar toolbar toolbar"
      "dock stage panel"
      "dock action panel";
  }

  .hero.workflow-active.editor-open .canvas-toolbar {
    grid-area: toolbar;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0;
  }

  .hero.workflow-active.editor-open .change-design-button {
    display: inline-flex !important;
    justify-self: start;
  }

  .hero.workflow-active.editor-open .price-pill {
    justify-self: center;
  }

  .hero.workflow-active.editor-open .preview-toggle {
    justify-self: end;
  }

  .hero.workflow-active.editor-open .shirt-stage {
    grid-area: stage;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 16px;
  }

  .hero.workflow-active.editor-open .shirt-canvas-viewport {
    width: min(100%, calc(100dvh - 220px), 680px) !important;
    max-width: 100%;
    max-height: 100%;
  }

  .hero.workflow-active.editor-open .editor-column {
    display: contents !important;
  }

  .hero.workflow-active.editor-open .primary-tool-dock {
    grid-area: dock;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    align-self: stretch;
    width: 96px;
    min-height: 0;
    padding: 7px;
    gap: 7px;
    border-radius: 14px;
  }

  .hero.workflow-active.editor-open .primary-tool-dock > button {
    min-height: 0;
    padding: 7px 3px;
    gap: 4px;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.15;
  }

  .hero.workflow-active.editor-open .primary-tool-dock > button img {
    width: clamp(28px, 4.2vh, 36px);
    height: clamp(28px, 4.2vh, 36px);
  }

  .hero.workflow-active.editor-open .design-editor {
    grid-area: stage;
    z-index: 13;
    align-self: end;
    justify-self: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: min(560px, calc(100% - 220px));
    margin: 0 0 10px;
    padding: 7px;
    gap: 7px;
    border: 1px solid #dfe5f1;
    border-radius: 14px;
    background: #fffffff2;
    box-shadow: 0 10px 28px #24365c18;
    backdrop-filter: blur(10px);
  }

  .hero.workflow-active.editor-open .quick-tools {
    gap: 5px;
  }

  .hero.workflow-active.editor-open .quick-tools button {
    min-height: 48px;
    padding: 4px 2px;
    border-radius: 10px;
    font-size: 9px;
  }

  .hero.workflow-active.editor-open .quick-tools button img {
    width: 23px;
    height: 23px;
  }

  .hero.workflow-active.editor-open .layers-button {
    align-self: stretch;
    min-width: 96px;
    min-height: 48px;
    margin: 0;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 11px;
  }

  .hero.workflow-active.editor-open .editor-action-message {
    grid-column: 1 / -1;
  }

  .hero.workflow-active.editor-open .workspace-action {
    grid-area: action;
    align-self: stretch;
    justify-self: center;
    width: min(620px, 100%);
    min-height: 0;
  }

  .hero.workflow-active.editor-open .continue-button {
    height: 100%;
    min-height: 48px;
    padding: 9px 18px;
  }

  .hero.workflow-active.editor-open .trust-row {
    display: none;
  }

  .hero.workflow-active.editor-open .tool-panel-backdrop {
    display: none !important;
  }

  .hero.workflow-active.editor-open .tool-panel-shell {
    position: relative;
    z-index: 14;
    grid-area: panel;
    inset: auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: hidden;
    border-radius: 16px;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero.workflow-active.editor-open .tool-panel-shell[hidden] {
    display: none;
  }

  .hero.workflow-active.editor-open .tool-panel-shell > header {
    padding: 10px 12px;
  }

  .hero.workflow-active.editor-open .tool-panel {
    min-height: 0;
    max-height: none;
    padding: 12px;
    overflow-y: hidden;
    overscroll-behavior: contain;
  }

  .hero.workflow-active.editor-open .artwork-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero.workflow-active.editor-open.preview-mode .editor-column {
    display: none !important;
  }

  .hero.workflow-active.editor-open.preview-mode .preview-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px minmax(0, 1fr);
    grid-template-areas:
      "toolbar"
      "stage";
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, textarea, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.site-header { position: relative; z-index: 10; max-width: 1440px; height: 72px; margin: auto; padding: 0 34px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid #edf0f6; background: #fff; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; font: 700 20px "Space Grotesk"; }
.brand-logo { display: block; width: auto; height: 52px; }
.brand-logo-compact { display: block; width: auto; height: 40px; object-fit: contain; }
.site-nav { display: flex; gap: 32px; }
.site-nav a { color: #354057; text-decoration: none; font-size: 14px; font-weight: 600; }
.site-nav a:hover { color: var(--purple); }
.site-menu-button,
.site-menu-cta { display: none; }
.header-resume-link { display: none; }
.header-cta { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; border-radius: 12px; color: white; background: linear-gradient(110deg, var(--purple), var(--blue)); text-decoration: none; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px #623cff29; }

main { overflow: hidden; }
.hero { max-width: 1440px; margin: auto; padding: 58px 34px 88px; background: radial-gradient(circle at 79% 16%, #eff0ff 0, #fff 31%); }
.hero-copy { max-width: 860px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 13px; color: var(--purple); font-size: 12px; font-weight: 800; letter-spacing: .17em; }
.eyebrow span { color: var(--blue); }
h1 { max-width: 820px; margin: 0; font: 700 clamp(48px, 5.3vw, 78px)/.98 "Space Grotesk"; letter-spacing: -.055em; }
h1 > span, .completion-card h1 span { background: linear-gradient(100deg, var(--purple), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy > p:last-of-type { max-width: 660px; margin: 18px 0 22px; color: #465269; font-size: 18px; line-height: 1.55; }
.resume-design-notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; max-width: 740px; margin: 0 0 24px; padding: 18px 20px; border: 1px solid #ded6ff; border-radius: 18px; background: #f6f3ff; }
.resume-design-notice strong { font-size: 16px; }
.resume-design-notice p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.resume-design-notice a { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 44px; padding: 12px 18px; border-radius: 12px; color: white; background: linear-gradient(110deg, var(--purple), var(--blue)); font-size: 14px; font-weight: 700; text-decoration: none; }
.resume-design-notice a:hover, .resume-design-notice a:focus-visible { box-shadow: 0 6px 18px #663cff30; outline: 2px solid #9e83ff; outline-offset: 3px; }
.controls-panel > .resume-design-notice { max-width: none; margin: 16px 0 0; }
.designer-loading-message { display: none; }
body.designer-loading main > :not(.designer-loading-message), body.designer-loading > footer { display: none; }
body.designer-loading .designer-loading-message { display: block; max-width: 760px; padding: 80px 24px; margin: auto; text-align: center; }
.designer-loading-message h1 { font-size: clamp(28px, 5vw, 42px); }
.designer-loading-message p { color: var(--muted); }
.designer-loading-message a { color: var(--purple); }
.hero:not(.workflow-active) .back-empty-actions { display: none; }
@media (max-width: 620px) {
  .resume-design-notice { padding: 16px; }
  .resume-design-notice a { width: 100%; }
}
.value-strip { display: inline-grid; grid-template-columns: repeat(3, auto); padding: 11px 8px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.86); box-shadow: 0 10px 30px #2432530b; }
.value-strip > span { min-width: 160px; padding: 0 18px; border-right: 1px solid var(--line); color: #4e5a70; font-size: 12px; line-height: 1.35; }
.value-strip > span:last-child { border-right: 0; }
.value-strip b { float: left; margin: 2px 8px 12px 0; color: var(--purple); }
.value-strip strong { color: var(--purple); }

.maker-shell { display: grid; grid-template-columns: minmax(380px, .78fr) minmax(530px, 1.22fr); max-width: 1240px; min-height: 650px; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.workspace-header { display: none; }
.mobile-workspace-brand { display: none; }
.controls-panel { position: relative; z-index: 2; padding: 30px; border-right: 1px solid var(--line); background: white; }
.product-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 8px 12px; border-radius: 999px; background: #efe8ff; color: #6632db; font-size: 12px; font-weight: 700; }
.product-pill span { font-size: 8px; }
.step-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 19px; }
.step-heading > span, .preview-badge b { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--purple), var(--blue)); color: white; font-size: 11px; }
.step-heading p, .step-heading h2 { margin: 0; }
.step-heading p { color: var(--muted); font-size: 11px; }
.step-heading h2 { margin-top: 1px; font: 700 22px "Space Grotesk"; }
.home-shirt-thumbnail { display: none; }
label, legend, .control-label { color: #303b52; font-size: 12px; font-weight: 700; }
.prompt-label { display: block; margin-bottom: 8px; }
.prompt-box { position: relative; }
textarea { width: 100%; min-height: 104px; padding: 15px 42px 15px 15px; resize: vertical; border: 1px solid #d6ddef; border-radius: 15px; background: #fbfcff; color: var(--ink); outline: none; line-height: 1.45; }
.prompt-spark { position: absolute; right: 15px; top: 16px; color: var(--purple); font-size: 18px; }
textarea:focus, select:focus, input:focus { border-color: #8560ff !important; box-shadow: 0 0 0 3px #7a39ff13; outline: none; }
.prompt-meta { display: flex; justify-content: flex-end; gap: 16px; margin: 7px 0 17px; color: #7a8498; font-size: 10px; }
.prompt-box textarea:focus::placeholder { color: transparent; }
.reference-upload { margin: 0 0 17px; }
.reference-image-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #d8dfee; border-radius: 10px; color: #465168; background: #fff; font-size: 10px; font-weight: 800; }
.reference-image-button span { color: var(--purple); font-size: 15px; line-height: 1; }
.reference-image-button:hover { border-color: var(--purple); color: var(--purple); background: #faf8ff; }
.reference-help { margin: 7px 0 0; color: #7a8498; font-size: 9px; line-height: 1.4; }
.reference-preview { display: grid; grid-template-columns: 54px minmax(0, 1fr) 27px; align-items: center; gap: 9px; margin-top: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcff; }
.reference-preview[hidden], .reference-uses[hidden] { display: none; }
.reference-preview img { width: 54px; height: 54px; object-fit: contain; border-radius: 8px; background: #eef1f7; }
.reference-preview strong, .reference-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-preview strong { color: #303b52; font-size: 10px; }
.reference-preview small { margin-top: 3px; color: #7a8498; font-size: 8px; }
.reference-preview button { width: 27px; height: 27px; border: 0; border-radius: 8px; color: #a43a49; background: #fff0f2; font-size: 18px; line-height: 1; }
.reference-uses { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.reference-uses label { display: flex; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; color: #525e73; background: #fff; font-size: 9px; font-weight: 700; }
.reference-uses input { accent-color: var(--purple); }
.reference-status { min-height: 0; margin: 6px 0 0; color: #a43a49; font-size: 9px; }
fieldset { margin: 0 0 17px; padding: 0; border: 0; }
.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 8px; }
.style-option { padding: 8px 4px; border: 1px solid var(--line); border-radius: 999px; background: white; color: #4e596e; font-size: 10px; }
.style-option.selected { border-color: var(--purple); background: #efe9ff; color: #6530db; font-weight: 700; }
.product-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.product-options label { display: grid; gap: 7px; }
.product-options label:first-child { grid-column: 1 / -1; }
select { width: 100%; appearance: none; padding: 10px 34px 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235f6b82' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; color: #333e54; }
input[type="email"] { width: 100%; margin: 7px 0 14px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; }
.rights-check { display: flex; gap: 9px; align-items: flex-start; color: #727d91; font-weight: 500; line-height: 1.35; }
.rights-check input { margin-top: 2px; accent-color: var(--purple); }
.primary-button, .continue-button { width: 100%; border: 0; border-radius: 12px; color: white; background: linear-gradient(105deg, var(--purple), var(--blue)); font-weight: 700; box-shadow: 0 12px 24px #663cff26; }
.primary-button { display: flex; justify-content: space-between; margin-top: 18px; padding: 14px 17px; }
.primary-button:hover, .continue-button:hover { filter: brightness(.96); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .62; }
.form-status { min-height: 16px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.preview-panel { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 25px 30px 20px; background: #f3f5fa; }
.canvas-toolbar { display: none; }
.canvas-price { display: none; }
.change-design-button, .preview-mode-button { padding: 7px 10px; border: 1px solid #d9ccff; border-radius: 9px; color: #6331d7; background: #f6f2ff; font-size: 9px; font-weight: 800; box-shadow: 0 5px 14px #202a4618; }
.preview-mode-button { border-color: #c9d9f7; color: #31547d; background: #f4f8ff; }
.preview-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 6px 6px; border: 1px solid #e0e4ee; border-radius: 999px; background: white; color: #455066; font-size: 11px; font-weight: 700; box-shadow: 0 5px 16px #2734580c; }
.preview-badge b { width: 21px; height: 21px; font-size: 9px; }
.price { padding: 8px 13px; border-radius: 999px; background: white; font: 700 15px "Space Grotesk"; box-shadow: 0 5px 16px #2734580c; }
.shirt-stage { position: relative; display: grid; place-items: center; min-height: 500px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.side-preview-toggle { position: absolute; z-index: 9; left: auto; right: auto; top: auto; bottom: auto; display: grid; place-items: center; width: 112px; height: 130px; padding: 0; border: 0; background: transparent; transform-origin: center bottom; cursor: pointer; }
.side-preview-toggle[hidden] { display: none; }
.side-preview-shirt { position: absolute; z-index: 2; top: 6px; left: 50%; width: 76px; height: 76px; overflow: hidden; background: var(--shirt); clip-path: polygon(39% 3%, 46% 1%, 54% 1%, 61% 3%, 66% 7%, 79% 13%, 84% 21%, 89% 43%, 75% 51%, 71% 38%, 72% 97%, 28% 97%, 29% 38%, 25% 51%, 11% 43%, 16% 21%, 21% 13%, 34% 7%); filter: drop-shadow(0 2px 2px #2734582e); transform: translateX(-50%); transition: background-color .18s ease, transform .18s ease; }
.side-preview-shirt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.side-preview-shirt #side-preview-shirt-image { z-index: 1; mix-blend-mode: multiply; }
.side-preview-shirt #side-preview-artwork { z-index: 2; }
.side-preview-rotation { position: absolute; z-index: 1; right: 5px; bottom: 0; width: 96px; height: 96px; transition: transform .2s ease; }
.side-preview-label { position: absolute; z-index: 3; top: 80px; left: 59px; min-width: 68px; padding: 4px 8px; border: 1px solid #dce2ed; border-radius: 999px; color: #3f4b61; background: #fffffff2; font-size: 10px; font-weight: 800; line-height: 1; text-align: center; text-transform: capitalize; white-space: nowrap; box-shadow: 0 3px 10px #2734581f; transform: translate(-50%, -50%); pointer-events: none; backdrop-filter: blur(5px); }
.side-preview-toggle:hover .side-preview-shirt { transform: translateX(-50%) translateY(-3px) scale(1.04); }
.side-preview-toggle:hover .side-preview-rotation { transform: rotate(-8deg) scale(1.04); }
.side-preview-toggle:hover .side-preview-label { border-color: var(--purple); color: #6530db; background: #efe9ff; }
.side-preview-toggle:focus-visible { outline: 3px solid #7a39ff42; outline-offset: 2px; border-radius: 18px; }
.back-empty-actions { position: absolute; z-index: 8; top: 45%; left: 50%; display: grid; gap: 8px; width: min(44%, 220px); padding: 13px 14px 14px; border: 1px solid #d9ccff; border-radius: 18px; background: #fffffff2; box-shadow: 0 12px 30px #202a4624; transform: translate(-50%, -50%); backdrop-filter: blur(8px); }
.back-empty-actions[hidden] { display: none; }
.back-empty-actions > strong { color: #1f2b47; font: 700 15px "Space Grotesk"; text-align: center; }
.back-action-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.back-action-options button { display: grid; place-items: center; gap: 4px; min-width: 0; min-height: 76px; padding: 4px 2px 5px; border: 0; border-radius: 13px; color: #26334f; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.back-action-options button:hover { color: #6530db; background: #f5f1ff; box-shadow: 0 0 0 2px #7a39ff12; }
.back-action-options button:focus-visible { outline: 3px solid #7a39ff42; outline-offset: 1px; }
.back-action-options img { display: block; width: 52px; height: 52px; pointer-events: none; }
.back-action-options span { pointer-events: none; }
.canvas-toolbar > .change-design-button { grid-column: 1; }
.canvas-toolbar > .canvas-price,
.canvas-toolbar > .remove-back-button { grid-column: 2; grid-row: 1; }
.canvas-toolbar > .preview-mode-button { grid-column: 3; }
.canvas-toolbar:has(.remove-back-button:not([hidden])) > .canvas-price { display: none; }
.canvas-toolbar > .remove-back-button { position: static; z-index: 1; justify-self: center; min-height: 30px; padding: 5px 9px; border: 1px solid #eccbd1; border-radius: 999px; color: #a43a49; background: #fff9fa; font-size: 8px; font-weight: 800; white-space: nowrap; box-shadow: 0 3px 10px #202a4612; }
.canvas-toolbar > .remove-back-button:hover { border-color: #d95a6b; background: #fff1f3; }
.hero.preview-mode .back-empty-actions,
.hero.preview-mode .canvas-toolbar > .remove-back-button { display: none; }
.print-side-control { position: absolute; z-index: 7; top: 10px; left: 50%; display: inline-flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid #dde2ed; border-radius: 12px; background: #fffffff2; box-shadow: 0 7px 20px #2532541a; transform: translateX(-50%); backdrop-filter: blur(8px); }
.print-side-control[hidden] { display: none; }
.print-side-control > span { padding: 0 7px; color: #7a8498; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.print-side-control button { display: inline-flex; align-items: center; gap: 4px; min-height: 29px; padding: 6px 10px; border: 0; border-radius: 8px; color: #4a556d; background: transparent; font-size: 9px; font-weight: 800; }
.print-side-control button small { color: #6c35db; font-size: 7px; }
.print-side-control button.selected { color: #fff; background: linear-gradient(105deg, var(--purple), var(--blue)); box-shadow: 0 5px 12px #663cff2c; }
.print-side-control button.selected small { color: #fff; }
.print-side-control .remove-back-button { padding-inline: 7px; color: #a33b4a; }
.stage-glow { position: absolute; width: 430px; height: 430px; border-radius: 50%; background: radial-gradient(circle, #d9d8ff 0, #edeafe 43%, transparent 70%); filter: blur(2px); }
.shirt-canvas-viewport { position: relative; z-index: 1; width: min(92%, 510px); aspect-ratio: 1; overflow: hidden; }
.shirt-workspace { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 28px 22px #22304b28); transform: translate(var(--canvas-pan-x, 0), var(--canvas-pan-y, 0)) scale(var(--canvas-zoom, 1)); transform-origin: center; transition: transform .18s ease; }
.shirt-workspace.shirt-turn-out,
.shirt-workspace.shirt-turn-in { pointer-events: none; will-change: transform, opacity, filter; }
.shirt-workspace.shirt-turn-out { animation: shirt-turn-out .18s cubic-bezier(.55, .06, .68, .19) both; }
.shirt-workspace.shirt-turn-in { animation: shirt-turn-in .22s cubic-bezier(.22, .61, .36, 1) both; }
.side-preview-toggle:disabled { cursor: wait; }
@keyframes shirt-turn-out {
  from { opacity: 1; filter: drop-shadow(0 28px 22px #22304b28); transform: perspective(900px) translate(var(--canvas-pan-x, 0), var(--canvas-pan-y, 0)) scale(var(--canvas-zoom, 1)) rotateY(0deg); }
  to { opacity: .62; filter: drop-shadow(0 10px 10px #22304b1c); transform: perspective(900px) translate(var(--canvas-pan-x, 0), var(--canvas-pan-y, 0)) scale(var(--canvas-zoom, 1)) rotateY(86deg); }
}
@keyframes shirt-turn-in {
  from { opacity: .62; filter: drop-shadow(0 10px 10px #22304b1c); transform: perspective(900px) translate(var(--canvas-pan-x, 0), var(--canvas-pan-y, 0)) scale(var(--canvas-zoom, 1)) rotateY(-86deg); }
  to { opacity: 1; filter: drop-shadow(0 28px 22px #22304b28); transform: perspective(900px) translate(var(--canvas-pan-x, 0), var(--canvas-pan-y, 0)) scale(var(--canvas-zoom, 1)) rotateY(0deg); }
}
.canvas-zoom-controls { position: absolute; z-index: 10; left: 16px; bottom: 16px; display: flex; width: 106px; height: 52px; overflow: hidden; border: 1px solid #d7deea; border-radius: 15px; background: #fff; box-shadow: 0 4px 12px #27345818; }
.shirt-stage:not(:has(.shirt-workspace.editor-ready)) .canvas-zoom-controls { display: none; }
.canvas-zoom-controls button { display: grid; flex: 1 1 50%; place-items: center; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.canvas-zoom-controls button:first-child { border-right: 1px solid #e0e5ee; }
.canvas-zoom-controls button:hover { background: #f6f8fc; }
.canvas-zoom-controls button:active { background: #eef2f8; }
.canvas-zoom-controls button:focus-visible { position: relative; z-index: 1; outline: 3px solid #7a39ff42; outline-offset: -3px; }
.canvas-zoom-controls button:disabled { cursor: default; opacity: .36; background: transparent; }
.canvas-zoom-controls img { display: block; width: 24px; height: 24px; pointer-events: none; user-select: none; }
.shirt-template { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background: #fff; }
.shirt-template::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--shirt);
  clip-path: polygon(
    39% 0%, 61% 0%, 65% 6%, 77% 10%, 81% 16%, 88% 44%,
    75% 50%, 74% 100%, 26% 100%, 27% 50%, 13% 44%, 19% 16%,
    23% 10%, 36% 6%
  );
}
.shirt-workspace[data-garment="long-sleeve"] .shirt-template::before {
  clip-path: polygon(38% 0, 62% 0, 67% 7%, 78% 11%, 94% 70%, 82% 76%, 74% 50%, 73% 100%, 27% 100%, 26% 50%, 18% 76%, 6% 70%, 22% 11%, 33% 7%);
}
.shirt-workspace[data-garment="hoodie"] .shirt-template::before {
  clip-path: polygon(35% 3%, 65% 3%, 69% 14%, 80% 17%, 86% 28%, 88% 55%, 86% 90%, 76% 97%, 72% 100%, 28% 100%, 24% 97%, 14% 90%, 12% 55%, 14% 28%, 20% 17%, 31% 14%);
}
.shirt-template img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
.shirt-workspace[data-preview-type="flat"] .shirt-template::before { display: none; }
.shirt-workspace .canvas-container { position: absolute !important; inset: 0; z-index: 2; width: 100% !important; height: 100% !important; pointer-events: auto !important; user-select: none !important; -webkit-user-select: none !important; filter: none; }
.shirt-workspace .canvas-container canvas { width: 100% !important; height: 100% !important; user-select: none !important; -webkit-user-select: none !important; }
.shirt-workspace .canvas-container .lower-canvas { pointer-events: none !important; }
.shirt-workspace .canvas-container .upper-canvas { z-index: 2; pointer-events: auto !important; touch-action: none !important; cursor: default; }
.hero.preview-mode .shirt-workspace .canvas-container .upper-canvas { pointer-events: none !important; touch-action: auto !important; }
.canvas-control-overlay { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.canvas-control-overlay[hidden] { display: none; }
.canvas-control-overlay button { position: absolute; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--layer-accent, #94a3b8); border-radius: 50%; color: var(--layer-accent, #475569); background: #ffffffed; font: 700 15px/1 Arial, sans-serif; box-shadow: 0 2px 7px #1e293b24; transform: translate(-50%, -50%) scale(var(--canvas-control-scale, 1)); pointer-events: auto; touch-action: none; cursor: grab; backdrop-filter: blur(4px); }
.canvas-control-overlay button svg { display: block; width: 14px; height: 14px; pointer-events: none; user-select: none; }
.canvas-control-overlay button svg [stroke="#566070"] { stroke: var(--layer-accent, #566070); }
.canvas-control-overlay button svg [fill="#566070"] { fill: var(--layer-accent, #566070); }
.canvas-control-overlay button svg [fill="#B0B9D1"] { fill: color-mix(in srgb, var(--layer-accent, #566070) 42%, white); }
.canvas-control-overlay button[data-canvas-control="mt"] { width: 23px; height: 31px; border-radius: 6px; }
.canvas-control-overlay button[data-canvas-control="mr"] { width: 31px; height: 23px; border-radius: 6px; }
.canvas-control-overlay button[data-canvas-control="mt"],
.canvas-control-overlay button[data-canvas-control="mr"] { border-color: transparent; background: transparent; box-shadow: none; backdrop-filter: none; }
.canvas-control-overlay button[data-canvas-control="mt"] svg { width: 10px; height: 19px; }
.canvas-control-overlay button[data-canvas-control="mr"] svg { width: 19px; height: 10px; }
.canvas-control-overlay button[data-canvas-control="mt"] svg,
.canvas-control-overlay button[data-canvas-control="mr"] svg { grid-area: 1 / 1; }
.canvas-control-overlay button .handle-icon-hover { display: none; }
.canvas-control-overlay button[data-canvas-control="br"] svg { width: 12px; height: 12px; }
.canvas-control-overlay button[data-canvas-control="move"] { cursor: move; }
.canvas-control-overlay button[data-canvas-control="delete"] { cursor: pointer; }
.canvas-control-overlay button:hover,
.canvas-control-overlay button:active { border-color: var(--purple); color: #6530db; background: #efe9ff; box-shadow: 0 0 0 2px #7a39ff12; }
.canvas-control-overlay button[data-canvas-control="mt"]:hover,
.canvas-control-overlay button[data-canvas-control="mr"]:hover { border-color: transparent; background: transparent; box-shadow: 0 0 0 2px #7a39ff12; }
.canvas-control-overlay button[data-canvas-control="mt"]:hover .handle-icon-default,
.canvas-control-overlay button[data-canvas-control="mr"]:hover .handle-icon-default { display: none; }
.canvas-control-overlay button[data-canvas-control="mt"]:hover .handle-icon-hover,
.canvas-control-overlay button[data-canvas-control="mr"]:hover .handle-icon-hover { display: block; }
.canvas-control-overlay button:active { cursor: grabbing; }
.canvas-control-overlay button:focus-visible { outline: 3px solid #1680ff; outline-offset: 2px; }
.canvas-text-editor {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: calc(100% - 16px);
  padding: 5px;
  border: 1px solid #e2e5ed;
  border-radius: 12px;
  background: #fffffff2;
  box-shadow: 0 8px 24px #26304f24;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  backdrop-filter: blur(9px);
}
.canvas-text-editor[hidden] { display: none; }
.canvas-text-editor.below { transform: translate(-50%, 0); }
.canvas-text-editor button,
.canvas-text-editor select,
.canvas-text-color {
  min-width: 29px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  color: #30394b;
  background: transparent;
  font: 700 11px/1 "DM Sans", sans-serif;
}
.canvas-text-editor button { display: grid; place-items: center; padding: 0 7px; cursor: pointer; }
.canvas-text-editor button:hover,
.canvas-text-editor button[aria-pressed="true"] { color: #5d2cdb; background: #f0ebff; }
.canvas-text-editor select { max-width: 86px; padding: 0 20px 0 7px; border-left: 1px solid #e7e9ef; font-weight: 600; cursor: pointer; }
.canvas-text-editor select#canvas-text-size { width: 48px; }
.canvas-text-editor .canvas-text-effects-toggle { color: #6530db; background: #f2edff; }
#canvas-text-effects-toggle { display: none !important; }
.canvas-text-color { position: relative; display: grid; place-items: center; width: 30px; overflow: visible; }
.canvas-text-color .text-color-trigger > span { width: 17px; height: 17px; }
.canvas-text-editor > button,
.canvas-text-editor > .text-toolbar-actions > button,
.canvas-text-editor > select,
.canvas-text-editor > .canvas-text-color {
  border: 1px solid #dfe3ec;
  background: #f8f9fc;
  box-shadow: 0 1px 2px #1f2a4410;
}
.canvas-text-editor > button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 14px;
}
.text-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; margin-left: auto; }
.canvas-text-editor > .text-toolbar-actions > button {
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 14px;
}
.canvas-text-editor > button:hover,
.canvas-text-editor > .text-toolbar-actions > button:hover,
.canvas-text-editor > button[aria-pressed="true"],
.canvas-text-editor > .text-toolbar-actions > button[aria-pressed="true"] {
  border-color: #c9b8ff;
  color: #5d2cdb;
  background: #f0ebff;
  box-shadow: 0 0 0 2px #7540f414;
}
.canvas-text-editor > select { border-left: 1px solid #dfe3ec; background-color: #fff; }
.canvas-text-editor > .canvas-text-color { width: 32px; min-width: 32px; }
.canvas-text-editor > .canvas-text-color > .text-color-trigger {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.canvas-text-editor > button strong,
.canvas-text-editor > button em,
.canvas-text-editor > button u { font-size: 14px; line-height: 1; }
.canvas-text-editor > button u { text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
.canvas-text-editor .text-toolbar-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.canvas-text-effects {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  display: grid;
  gap: 7px;
  width: min(260px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid #dedfeb;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 12px 30px #2029442c;
  transform: translateX(-50%);
  max-height: min(250px, calc(100vh - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.canvas-text-editor.effects-below .canvas-text-effects { top: calc(100% + 7px); bottom: auto; }
.canvas-text-effects[hidden] { display: none; }
.text-effect-heading { display: flex; align-items: center; justify-content: space-between; }
.text-effect-heading strong { font-size: 11px; }
.canvas-text-effects .text-effect-heading button { width: 26px; min-width: 26px; height: 26px; color: #596477; background: #f4f6fa; }
.canvas-text-effects > label,
.editor-text-effects > label { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 9px; font-weight: 700; }
.canvas-text-effects select,
.canvas-text-effects input[type="color"],
.editor-text-effects select,
.editor-text-effects input[type="color"] { width: 100%; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.canvas-text-effects input[type="color"],
.editor-text-effects input[type="color"] { padding: 3px; }
.canvas-text-effects input[type="range"],
.editor-text-effects input[type="range"] { width: 100%; accent-color: var(--purple); }
.effect-toggle { min-width: 48px !important; height: 31px !important; justify-self: end; border: 1px solid var(--line) !important; background: #fff !important; }
.effect-toggle[aria-pressed="true"] { border-color: #7440f4 !important; color: #6530db !important; background: #f2edff !important; }
.canvas-control-overlay button[data-canvas-control="curve"] {
  width: 56px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  box-shadow: 0 4px 12px #2b22532c;
  cursor: ns-resize;
  backdrop-filter: none;
}
.text-fx-mode-button {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 4%;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #d8c9ff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(110deg, #7136f3, #226bf3);
  box-shadow: 0 9px 24px #4c2bb644;
  font-size: 10px;
  font-weight: 900;
  transform: translateX(-50%);
}
.text-fx-mode-button[hidden] { display: none; }
.canvas-control-overlay button[data-canvas-control="curve"]:hover,
.canvas-control-overlay button[data-canvas-control="curve"]:active { border: 0; background: transparent; box-shadow: 0 5px 15px #5120b842; }
.canvas-control-overlay button[data-canvas-control="curve"] img { display: block; width: 56px; height: 40px; pointer-events: none; user-select: none; }
.canvas-control-overlay button[data-canvas-control="curve"]::after {
  content: attr(data-hint);
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  width: max-content;
  max-width: 145px;
  padding: 6px 9px;
  border: 1px solid #dce1eb;
  border-radius: 999px;
  color: #5c6679;
  background: #fff;
  font: 700 9px/1.2 "DM Sans", sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(4px);
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 6px 18px #26314924;
}
.canvas-control-overlay button[data-canvas-control="curve"]:focus-visible::after,
.canvas-control-overlay button[data-canvas-control="curve"].show-hint::after { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 620px) {
  .shirt-workspace .canvas-container .upper-canvas {
    touch-action: pan-y !important;
    overscroll-behavior-y: auto;
  }
  .canvas-control-overlay button { width: 22px; height: 22px; }
  .canvas-control-overlay button svg { width: 14px; height: 14px; }
  .canvas-control-overlay button[data-canvas-control="mt"] { width: 27px; height: 36px; }
  .canvas-control-overlay button[data-canvas-control="mr"] { width: 36px; height: 27px; }
  .canvas-control-overlay button[data-canvas-control="mt"] svg { width: 12px; height: 22px; }
  .canvas-control-overlay button[data-canvas-control="mr"] svg { width: 22px; height: 12px; }
  .canvas-control-overlay button[data-canvas-control="br"] svg { width: 12px; height: 12px; }
  .canvas-text-editor { gap: 2px; padding: 4px; border-radius: 11px; }
  .canvas-text-editor button,
  .canvas-text-editor select,
  .canvas-text-color { min-width: 28px; height: 32px; }
  .canvas-text-editor select { max-width: 75px; padding-left: 5px; font-size: 10px; }
}
.print-area-guide { position: absolute; z-index: 3; top: 17.6667%; left: 33.5333%; width: 33.6667%; height: 44.8667%; pointer-events: none; border: 1px dashed #ffffffd6; border-radius: 4px; box-shadow: none; transition: opacity .16s ease; }
.print-area-guide span { position: absolute; right: 3px; bottom: 2px; padding: 2px 4px; border-radius: 3px; color: #fff; background: #11182788; font-size: 6px; font-weight: 800; letter-spacing: .08em; }
.print-area-guide.guide-hidden { opacity: 0; }
.editor-action-message { margin: 8px 0 0; padding: 9px 11px; border: 1px solid #d9ccff; border-radius: 9px; color: #5425ba; background: #f5f1ff; font-size: 10px; font-weight: 700; line-height: 1.35; }
.shirt-workspace:not(.editor-ready) .canvas-container, .shirt-workspace:not(.editor-ready) .print-area-guide { pointer-events: none; opacity: 0; }
.empty-preview { position: absolute; z-index: 2; top: 41%; text-align: center; color: white; text-shadow: 0 1px 8px #0008; }
.empty-preview p { margin: 5px 0 1px; font-weight: 700; }
.empty-preview span { font-size: 10px; opacity: .75; }
.spark { color: var(--lime); font-size: 28px; }
.generation-progress { position: absolute; z-index: 3; width: min(88%, 470px); padding: 14px 22px 18px; border: 1px solid #ffffffab; border-radius: 22px; background: #171a2bf0; color: white; text-align: center; box-shadow: 0 18px 45px #0003; backdrop-filter: blur(10px); }
.generation-progress p { margin: 3px 0 8px; font: 700 17px "Space Grotesk"; }
.generation-progress small { display: block; margin-top: 9px; color: #ffffffad; font-size: 10px; line-height: 1.4; }
.shirt-factory-animation { position: relative; width: 100%; aspect-ratio: 8 / 5; margin: 0 auto; overflow: hidden; }
.shirt-factory-animation svg,
.shirt-factory-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.shirt-factory-animation svg { z-index: 2; }
.shirt-factory-poster { z-index: 1; }
.shirt-factory-animation[data-ready="true"] .shirt-factory-poster { visibility: hidden; }
.shirt-factory-animation[data-failed="true"] svg,
.shirt-factory-animation[data-reduced-motion="true"] svg { visibility: hidden; }
.shirt-factory-animation[data-failed="true"] .shirt-factory-poster,
.shirt-factory-animation[data-reduced-motion="true"] .shirt-factory-poster { visibility: visible; }

.design-results { position: relative; z-index: 4; padding-top: 18px; border-top: 1px solid #dfe3ec; }
.results-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.results-heading h3 { margin: 2px 0 0; font: 700 18px "Space Grotesk"; }
.results-heading > span { color: var(--muted); font-size: 10px; }
.design-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 15px; }
.design-card { position: relative; aspect-ratio: 1; overflow: hidden; padding: 6px; border: 2px solid transparent; border-radius: 13px; background: white; box-shadow: 0 5px 15px #28365610; }
.design-card img { width: 100%; height: 100%; object-fit: contain; }
.design-card.selected { border-color: var(--purple); box-shadow: 0 0 0 3px #7a39ff18; }
.design-card.selected::after { content: "✓"; position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--purple); color: white; font-size: 11px; }
.design-editor { margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 10px 25px #2532540c; }
.editor-heading-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-end; margin-bottom: 13px; }
.editor-heading-row h3 { margin: 2px 0 0; font: 700 19px "Space Grotesk"; }
.editor-kicker { color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.editor-help { color: var(--muted); font-size: 9px; }
.editor-controls { display: grid; grid-template-columns: 1fr; gap: 12px; }
.control-label { text-transform: uppercase; color: #7e889a; font-size: 8px; letter-spacing: .13em; }
.editor-button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.editor-button-grid button, .editor-text-tools button { padding: 9px 6px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #384359; font-size: 9px; font-weight: 700; }
.editor-button-grid button:hover, .editor-text-tools button:hover { border-color: #8865ff; color: var(--purple); }
.editor-button-grid .editor-delete { grid-column: 1/-1; color: #b43848; }
.quick-tools { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.quick-tools button { min-width: 0; padding: 9px 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcff; color: #465168; font-size: 8px; font-weight: 700; }
.quick-tools button b { display: block; margin-bottom: 2px; color: var(--purple); font-size: 14px; line-height: 1; }
.quick-tools button:hover { border-color: #8865ff; color: var(--purple); background: #f7f3ff; }
.studio-drawers { display: grid; grid-template-columns: 1fr; gap: 8px; }
.studio-drawer { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fbfcff; }
.studio-drawer summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; cursor: pointer; list-style: none; color: #384359; font-size: 10px; font-weight: 800; }
.studio-drawer summary::-webkit-details-marker { display: none; }
.studio-drawer summary span { display: inline-flex; align-items: center; gap: 7px; }
.studio-drawer summary b { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; color: var(--purple); background: #eee8ff; font-size: 10px; }
.color-picker-icon { display: block; width: 18px; height: 18px; }
.studio-drawer summary b .color-picker-icon { width: 17px; height: 17px; }
.color-option-label { display: inline-flex !important; align-items: center; gap: 5px; }
.color-option-label .color-picker-icon { width: 14px; height: 14px; }
.studio-drawer summary small { color: #7b8599; font-size: 8px; font-weight: 700; }
.studio-drawer[open] summary { border-bottom: 1px solid #e8ebf2; background: white; }
.editor-text-tools { display: grid; gap: 8px; padding: 10px; }
.text-format-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.text-format-toolbar button,
.text-format-toolbar select,
.text-toolbar-color { height: 36px; border: 1px solid var(--line); border-radius: 9px; color: #384359; background: white; font-size: 10px; font-weight: 700; }
.text-format-toolbar button { display: grid; place-items: center; width: 36px; padding: 0; cursor: pointer; }
.text-format-toolbar button[aria-pressed="true"] { border-color: #7440f4; color: #6530db; background: #f2edff; box-shadow: 0 0 0 2px #7440f414; }
.text-format-toolbar select { min-width: 0; padding: 0 24px 0 8px; cursor: pointer; }
.text-format-toolbar #editor-text-font { flex: 1 1 115px; }
.text-format-toolbar #editor-text-size { flex: 0 0 62px; }
.text-format-toolbar .editor-text-effects-toggle { flex: 0 0 auto; width: auto; padding-inline: 10px; color: #6530db; background: #f5f1ff; }
.text-toolbar-color { position: relative; display: grid; place-items: center; width: 38px; overflow: visible; }
.text-toolbar-color .text-color-trigger > span { width: 21px; height: 21px; }
.text-color-picker { position: relative; flex: 0 0 auto; }
.text-color-trigger { display: grid !important; place-items: center; width: 100% !important; min-width: 30px !important; height: 100% !important; padding: 0 !important; border: 0 !important; border-radius: inherit !important; background: transparent !important; }
.text-color-trigger > span { display: block; border: 2px solid #fff; border-radius: 50%; background: var(--text-color, #fff); box-shadow: 0 0 0 1px #aab2c0; pointer-events: none; }
.native-text-color-input { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; opacity: 0; pointer-events: none; }
.text-color-popover { position: absolute; z-index: 70; top: calc(100% + 8px); right: 0; display: grid; gap: 10px; width: min(290px, calc(100vw - 24px)); padding: 12px; border: 1px solid #dce2ed; border-radius: 14px; color: #263149; background: #fff; box-shadow: 0 18px 48px #18223d36; }
.text-toolbar-color .text-color-popover { right: auto; left: 0; }
.text-color-popover[hidden] { display: none; }
.text-color-popover-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.text-color-popover-header strong { font: 700 13px "Space Grotesk"; }
.text-color-popover-close { display: grid !important; place-items: center; width: 27px !important; min-width: 27px !important; height: 27px !important; padding: 0 !important; border: 1px solid #e0e5ef !important; border-radius: 8px !important; color: #657086 !important; background: #f7f8fb !important; font-size: 17px !important; }
.text-color-swatches { display: grid; grid-template-columns: repeat(6, 36px); justify-content: space-between; gap: 6px 0; }
.text-color-swatch { display: grid !important; place-items: center; width: 36px !important; min-width: 36px !important; height: 36px !important; aspect-ratio: 1; padding: 0 !important; border: 2px solid transparent !important; border-radius: 50% !important; background: var(--swatch) !important; box-shadow: inset 0 0 0 1px #9da6b6, 0 2px 6px #24304c12; }
.text-color-swatch[aria-pressed="true"] { border-color: #7540ef !important; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #7540ef24; }
.text-color-custom { display: grid; gap: 8px; padding-top: 9px; border-top: 1px solid #e5e8f0; }
.text-color-custom-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.text-color-custom-title strong { font-size: 10px; }
.text-color-wheel-button { width: auto !important; height: 31px !important; padding: 0 10px !important; border: 1px solid #d9def0 !important; border-radius: 8px !important; color: #6430d8 !important; background: #f7f3ff !important; font-size: 9px !important; font-weight: 900 !important; }
.text-color-entry { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, .6fr)) auto; gap: 5px; }
.text-color-entry label { display: grid; gap: 3px; color: #7b8599; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.text-color-entry input { width: 100%; min-width: 0; height: 32px; padding: 5px 6px; border: 1px solid #dce1eb; border-radius: 7px; color: #29344a; background: #fff; font-size: 9px; }
.text-color-apply { align-self: end; width: auto !important; min-width: 48px !important; height: 32px !important; padding: 0 8px !important; border: 0 !important; border-radius: 8px !important; color: #fff !important; background: linear-gradient(110deg, #7038ef, #176ff3) !important; font-size: 8px !important; font-weight: 900 !important; }
.custom-color-wheel { position: absolute; z-index: 3; inset: 8px; display: grid; grid-template-rows: auto minmax(105px, 1fr) auto; gap: 9px; padding: 10px; border: 1px solid #d9deea; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px #18223d35; }
.custom-color-wheel[hidden] { display: none; }
.custom-color-wheel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.custom-color-wheel-header strong { font-size: 11px; }
.custom-color-wheel-header button { display: grid !important; place-items: center; width: 27px !important; min-width: 27px !important; height: 27px !important; padding: 0 !important; border: 1px solid #dfe3ec !important; border-radius: 8px !important; color: #657086 !important; background: #f7f8fb !important; font-size: 17px !important; }
.custom-color-spectrum { position: relative; min-height: 105px; border-radius: 9px; touch-action: none; cursor: crosshair; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--wheel-hue, #f00)); box-shadow: inset 0 0 0 1px #2631492b; }
.custom-color-spectrum > span { position: absolute; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px #111, 0 1px 4px #0006; pointer-events: none; }
.custom-color-hue { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 7px; color: #6d7789; font-size: 8px; font-weight: 900; }
.custom-color-hue input { width: 100%; height: 15px; padding: 0; border: 0; border-radius: 999px; appearance: none; background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.custom-color-hue input::-webkit-slider-thumb { width: 18px; height: 18px; border: 2px solid #fff; border-radius: 50%; appearance: none; background: #fff; box-shadow: 0 0 0 1px #47536b; }
@media (max-width: 620px) {
  .text-color-popover { position: fixed; z-index: 90; top: 72px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 90px); overflow-y: auto; }
  .text-color-swatches { grid-template-columns: repeat(6, 38px); }
  .text-color-swatch { width: 38px !important; min-width: 38px !important; height: 38px !important; }
}
.editor-text-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.editor-text-row input[type="text"] { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.editor-text-row #add-text-button { min-width: 54px; padding-inline: 13px; border-color: transparent; color: #fff; background: linear-gradient(105deg, var(--purple), var(--blue)); box-shadow: 0 6px 14px #663cff20; }
.editor-text-effects { display: grid; gap: 7px; padding: 9px; border: 1px solid #e3dcf8; border-radius: 11px; background: #faf8ff; }
.editor-text-effects[hidden] { display: none; }
.editor-note { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.workspace-action { align-self: end; }
.continue-button { display: flex; justify-content: center; gap: 12px; padding: 13px; }
.continue-button:disabled { cursor: not-allowed; opacity: .35; }
.trust-row { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; color: #6d7789; font-size: 9px; }

/* Step 2 becomes a dedicated workspace so the designer starts above the fold. */
.hero.workflow-active { max-width: 100%; padding-top: 20px; background: #f5f7fc; }
.hero.workflow-active ~ .how-it-works { display: none; }
.hero.workflow-active .hero-copy, .hero.workflow-active .controls-panel { display: none; }
.hero.workflow-active .maker-shell { grid-template-columns: minmax(0, 1fr); max-width: 1372px; min-height: calc(100vh - 130px); margin: auto; border-radius: 22px; }
.hero.workflow-active .workspace-header { display: grid; grid-template-columns: minmax(220px, auto) minmax(260px, 1fr) auto; gap: 22px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); background: white; }
.workspace-step { display: flex; align-items: center; gap: 11px; }
.workspace-step > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--purple), var(--blue)); font-size: 11px; font-weight: 800; }
.workspace-step p, .workspace-step h2 { margin: 0; }
.workspace-step p { color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.workspace-step h2 { margin-top: 1px; font: 700 18px "Space Grotesk"; }
.workspace-prompt { min-width: 0; margin: 0; overflow: hidden; color: #697389; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.start-over-button { justify-self: end; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #465168; font-size: 11px; font-weight: 700; }
.start-over-button:hover { border-color: var(--purple); color: var(--purple); }
.workspace-product-options { display: grid; gap: 10px; padding: 10px; }
.workspace-option-group { display: flex; align-items: center; gap: 10px; }
.workspace-option-group > span { color: #778196; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.workspace-size-options, .workspace-color-options { display: flex; align-items: center; gap: 7px; }
.workspace-style-group { align-items: flex-start; }
.workspace-style-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
.workspace-style-card { position: relative; min-width: 0; }
.workspace-style-select { display: grid; gap: 2px; width: 100%; height: 100%; padding: 9px 32px 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: #303a50; background: #fff; text-align: left; }
.workspace-style-select strong { font-size: 10px; }
.workspace-style-select small { color: #778196; font-size: 8px; line-height: 1.25; }
.workspace-style-select:hover,
.workspace-style-select.selected { border-color: var(--purple); color: #6530db; background: #f7f3ff; box-shadow: 0 0 0 2px #7a39ff12; }
.workspace-shirt-info { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 1px solid #d9dff0; border-radius: 50%; color: #6d45dc; background: #f8f6ff; font: 800 11px/1 "Space Grotesk"; box-shadow: 0 2px 5px #3b2d6b12; }
.workspace-shirt-info:hover { border-color: var(--purple); color: #fff; background: var(--purple); transform: translateY(-1px); }
.workspace-preview-options { display: flex; gap: 7px; width: 100%; }
.workspace-preview-options button { flex: 1 1 0; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: #4b566d; background: #fff; font-size: 9px; font-weight: 800; }
.workspace-preview-options button:hover,
.workspace-preview-options button.selected { border-color: var(--purple); color: #6530db; background: #f7f3ff; box-shadow: 0 0 0 2px #7a39ff12; }
.workspace-color-group { align-items: flex-start; flex-direction: column; }
.color-option-label { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.color-option-label > span { display: flex; align-items: center; gap: 5px; }
.color-option-label em { overflow: hidden; max-width: 70%; color: #4b566d; font-style: normal; letter-spacing: 0; text-align: right; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.workspace-color-options { display: grid; grid-template-columns: repeat(auto-fill, 29px); width: 100%; }
.workspace-size-options button { min-width: 36px; height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #4b566d; font-size: 10px; font-weight: 700; }
.workspace-size-options button.selected { border-color: var(--purple); background: #efe9ff; color: #6530db; box-shadow: 0 0 0 2px #7a39ff12; }
.workspace-size-options button:disabled { cursor: not-allowed; opacity: .3; text-decoration: line-through; }
.popular-color-section { display: grid; width: 100%; gap: 8px; padding: 10px 11px; border: 1px solid #e1e5ef; border-radius: 12px; background: #f8f9fd; }
.popular-color-section > strong, .all-color-heading { color: #465168; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: none; }
.popular-color-section[hidden] { display: none; }
.popular-color-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: center; justify-items: center; gap: 3px; width: 100%; }
.all-color-heading { width: 100%; margin-top: 2px; }
.workspace-color-options button, .popular-color-options button { width: 29px; height: 29px; padding: 3px; border: 2px solid transparent; border-radius: 50%; background: var(--swatch); background-clip: content-box; box-shadow: inset 0 0 0 1px #b8bfcd; }
.popular-color-options button { width: 32px; height: 32px; padding: 3px; }
.workspace-color-options button.selected, .popular-color-options button.selected { border-color: var(--purple); box-shadow: inset 0 0 0 1px #aab2c1, 0 0 0 2px #7a39ff18; }
.hero.workflow-active .preview-panel { display: grid; grid-template-columns: minmax(500px, 1.1fr) minmax(360px, .72fr); grid-template-rows: auto auto 1fr auto; grid-template-areas: "results results" "toolbar ." "stage editor" "trust trust"; gap: 14px 22px; min-height: 720px; padding: 18px 22px; }
.hero.workflow-active .shirt-stage { grid-area: stage; min-height: 560px; border-radius: 18px; background: #eef1f8; }
.hero.workflow-active .trust-row { grid-area: trust; }
.hero.workflow-active .design-results { grid-area: results; display: grid; grid-template-columns: minmax(175px, 1fr) minmax(440px, 600px); align-items: center; gap: 20px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 20px #25325408; }
.hero.workflow-active .editor-column { grid-area: editor; display: flex; flex-direction: column; align-self: start; gap: 14px; min-width: 0; }
.hero.workflow-active .design-editor { min-width: 0; }
.hero.workflow-active .workspace-action { width: 100%; }
.hero.workflow-active.editor-open .canvas-toolbar { grid-area: toolbar; z-index: 8; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; min-height: 38px; padding: 0 2px; }
.hero.workflow-active.editor-open .change-design-button { display: none; justify-self: start; }
.hero.workflow-active.editor-open .preview-mode-button { justify-self: end; }
.hero.workflow-active.editor-open .canvas-price { display: inline-flex; align-items: center; justify-content: center; padding: 7px 11px; border: 1px solid #dfe4ef; border-radius: 999px; color: #20293b; background: #fff; font: 700 12px "Space Grotesk"; box-shadow: 0 4px 12px #202a4610; }
.hero.workflow-active:not(.results-ready) .preview-panel { grid-template-columns: 1fr; grid-template-areas: "stage" "trust"; }
.hero.workflow-active:not(.results-ready) .shirt-stage { width: min(100%, 760px); margin: auto; }
.hero.workflow-active .design-grid { margin: 0; }
.hero.workflow-active .design-card { aspect-ratio: 1.35; }
.hero.workflow-active .continue-button { box-shadow: 0 10px 24px #663cff26; }
.hero.workflow-active.preview-mode .preview-panel { grid-template-columns: 1fr; grid-template-areas: "toolbar" "stage" "trust"; }
.hero.workflow-active.preview-mode .design-results,
.hero.workflow-active.preview-mode .editor-column { display: none; }
.hero.workflow-active.preview-mode .change-design-button,
.hero.workflow-active.preview-mode .canvas-price { visibility: hidden; }
.hero.workflow-active.preview-mode .preview-mode-button { border-color: #c9cfe0; color: #303b52; background: #fff; }
.hero.workflow-active.preview-mode .print-area-guide { opacity: 0 !important; }
.hero.workflow-active.preview-mode .shirt-stage { min-height: 640px; }

@media (min-width: 621px) {
  .hero.workflow-active.editor-open .canvas-toolbar { grid-template-columns: auto auto; justify-content: center; gap: 10px; min-height: 42px; }
  .hero.workflow-active.editor-open .canvas-price,
  .hero.workflow-active.editor-open .preview-mode-button { box-sizing: border-box; width: auto; min-height: 40px; padding: 9px 13px; justify-self: center; font-size: 11px; }
  .hero.workflow-active.preview-mode .canvas-toolbar { grid-template-columns: auto; }
  .hero.workflow-active.preview-mode .canvas-price { display: none; }
  .hero.workflow-active.preview-mode .preview-mode-button { grid-column: 1; justify-self: center; }
  .hero.workflow-active.preview-mode .shirt-stage { min-height: 700px; }
  .hero.workflow-active.preview-mode .shirt-canvas-viewport { width: min(92%, 620px); }
}

/* Mobile editor application shell. The page chrome and Step 2 header become
   one compact bar, while the two editing rows remain pinned above the fold. */
@media (max-width: 620px) {
  body:has(.hero.workflow-active.editor-open) {
    height: 100dvh;
    overflow: hidden;
    background: #f3f5fa;
  }
  body:has(.hero.workflow-active.editor-open) > .site-header,
  body:has(.hero.workflow-active.editor-open) > footer {
    display: none;
  }
  .hero.workflow-active.editor-open {
    height: 100dvh;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }
  .hero.workflow-active.editor-open .maker-shell {
    grid-template-rows: 52px minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }
  .hero.workflow-active.editor-open .workspace-header {
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 52px;
    padding: 6px 9px;
    box-shadow: 0 4px 16px #2532540d;
  }
  .hero.workflow-active.editor-open .mobile-workspace-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
  }
  .hero.workflow-active.editor-open .mobile-workspace-brand .brand-logo-compact {
    width: clamp(84px, 22vw, 118px);
    height: 40px;
    object-fit: contain;
    object-position: left center;
  }
  .hero.workflow-active.editor-open .workspace-step {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    justify-self: stretch;
    justify-content: center;
  }
  .hero.workflow-active.editor-open .workspace-step > div { min-width: 0; overflow: hidden; }
  .hero.workflow-active.editor-open .workspace-step > span { width: 20px; height: 20px; }
  .hero.workflow-active.editor-open .workspace-step h2 { max-width: 100%; font-size: 12px; }
  .hero.workflow-active.editor-open .start-over-button { display: none; }
  .hero.workflow-active.editor-open .workspace-header > .workspace-action {
    align-self: center;
    width: auto;
    min-width: 0;
    margin: 0;
  }
  .hero.workflow-active.editor-open .workspace-header > .workspace-action[hidden] { display: none; }
  .hero.workflow-active.editor-open .workspace-header .continue-button {
    position: static;
    width: auto;
    min-width: 76px;
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 0;
    line-height: 1;
    box-shadow: 0 6px 16px #663cff24;
  }
  .hero.workflow-active.editor-open .workspace-header .continue-button::before {
    content: "Continue";
    font-size: 10px;
  }
  .hero.workflow-active.editor-open .workspace-header .continue-button > span { display: none; }

  .hero.workflow-active.editor-open .preview-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "toolbar" "stage" "editor";
    align-content: start;
    height: 100%;
    min-height: 0;
    padding: 6px 7px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .canvas-toolbar {
    position: sticky;
    z-index: 18;
    top: 0;
    background: #f3f5faed;
    backdrop-filter: blur(8px);
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage {
    flex: none;
    height: 372px;
    min-height: 372px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .editor-column {
    position: sticky;
    z-index: 17;
    bottom: 0;
    display: grid;
    gap: 5px;
    width: 100%;
    margin-top: -6px;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    background: #f3f5fa;
    box-shadow: 0 -10px 24px #2532540d;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .design-editor {
    min-height: 52px;
    padding: 5px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .quick-tools button {
    min-height: 44px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .primary-tool-dock {
    gap: 4px;
    padding: 5px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .primary-tool-dock > button {
    min-height: 60px;
    padding: 4px 2px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .primary-tool-dock > button img {
    width: 28px;
    height: 28px;
  }
}

.how-it-works { max-width: 1240px; margin: 0 auto 90px; padding: 0 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-it-works > div { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: #fbfcff; }
.how-it-works span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: white; background: linear-gradient(135deg,var(--purple),var(--blue)); font-weight: 700; }
.how-it-works h3 { margin: 16px 0 7px; font: 700 18px "Space Grotesk"; }
.how-it-works p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
footer { max-width: 1240px; margin: auto; padding: 27px 34px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer .brand { color: var(--ink); font-size: 15px; }
footer .brand-logo { height: 44px; }

.confirm-dialog { width: min(calc(100% - 32px), 410px); padding: 27px; border: 1px solid #e0e4ef; border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 30px 90px #151d3547; text-align: center; }
.confirm-dialog::backdrop { background: #151b2d99; backdrop-filter: blur(4px); }
.confirm-dialog-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 13px; border-radius: 13px; color: #7139e7; background: #efe9ff; font-size: 22px; font-weight: 700; }
.confirm-dialog .editor-kicker { margin: 0 0 5px; }
.confirm-dialog h2 { margin: 0; font: 700 25px "Space Grotesk"; }
.confirm-dialog > p:not(.editor-kicker) { margin: 10px auto 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.confirm-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.confirm-dialog-actions button { padding: 11px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; }
.design-ready-dialog {
  width: min(calc(100% - 28px), 640px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #e0e4ef;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 90px #151d3559;
}
.design-ready-dialog::backdrop { background: #273765a8; backdrop-filter: blur(5px); }
.design-ready-dialog > header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 42px; align-items: center; gap: 10px; margin-bottom: 14px; }
.design-ready-dialog h2 { margin: 0; font: 700 28px "Space Grotesk"; }
.design-ready-spark { color: #6336ed; font-size: 35px; line-height: 1; text-align: center; }
.design-ready-dialog > header > button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  color: #8993a7;
  background: transparent;
  font: 300 35px/1 Arial, sans-serif;
}
.design-ready-dialog > header > button:hover { color: #536078; background: #f3f5f9; }
.design-ready-artwork { display: grid; place-items: center; overflow: hidden; aspect-ratio: 1; border-radius: 17px; background: linear-gradient(145deg, #f3f6fa, #edf1f6); }
.design-ready-artwork img { display: block; width: 100%; height: 100%; object-fit: contain; }
.design-ready-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 13px;
  padding: 15px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(105deg, var(--purple), var(--blue));
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 26px #663cff2b;
}
.design-ready-action span { font-size: 27px; line-height: 16px; }
.shirt-info-dialog {
  width: min(calc(100% - 28px), 640px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #e0e4ef;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 90px #151d3559;
}
.shirt-info-dialog::backdrop { background: #273765a8; backdrop-filter: blur(5px); }
.shirt-info-dialog > header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 42px; align-items: center; gap: 10px; margin-bottom: 14px; }
.shirt-info-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--purple), var(--blue)); font: 800 19px/1 "Space Grotesk"; }
.shirt-info-dialog header p { margin: 0 0 2px; color: var(--purple); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.shirt-info-dialog h2 { margin: 0; font: 700 25px "Space Grotesk"; }
.shirt-info-dialog > header > button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 11px; color: #8993a7; background: transparent; font: 300 35px/1 Arial, sans-serif; }
.shirt-info-dialog > header > button:hover { color: #536078; background: #f3f5f9; }
.shirt-info-preview { display: grid; place-items: center; overflow: hidden; min-height: 260px; max-height: 370px; border-radius: 17px; background: linear-gradient(145deg, #f3f6fa, #edf1f6); }
.shirt-info-preview img { display: block; width: 100%; height: 100%; max-height: 370px; object-fit: contain; }
.shirt-info-copy { padding: 16px 4px 3px; }
.shirt-info-copy strong { display: block; color: #4b566c; font-size: 12px; }
.shirt-info-copy p { margin: 8px 0 0; color: #5f6a80; font-size: 13px; line-height: 1.65; white-space: pre-line; }
.confirm-cancel { border: 1px solid var(--line); color: #465168; background: #fff; }
.confirm-danger { border: 1px solid #d54a5d; color: #fff; background: #c83d50; }
.confirm-upgrade { border: 1px solid #6535e7; color: #fff; background: linear-gradient(105deg, var(--purple), var(--blue)); }
.confirm-cancel:hover { border-color: var(--purple); color: var(--purple); }
.confirm-danger:hover { background: #b83245; }

.completion-card { max-width: 680px; margin: 12vh auto; padding: 48px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); text-align: center; }
.completion-card h1 { margin: 0; font: 700 clamp(38px,7vw,64px)/1 "Space Grotesk"; }
.completion-card p { color: var(--muted); line-height: 1.6; }
.completion-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.completion-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 11px 17px; border-radius: 11px; font-size: 12px; font-weight: 800; text-decoration: none; }
.completion-primary { color: #fff; background: linear-gradient(110deg, var(--purple), var(--blue)); box-shadow: 0 8px 20px #623cff26; }
.completion-secondary { border: 1px solid var(--line); color: #3d4961; background: #fff; }
.footer-account-link { color: #5d36d8; font-weight: 700; text-decoration: none; }
.footer-account-link:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto auto; gap: 9px; }
  .site-nav {
    position: absolute;
    z-index: 70;
    top: calc(100% + 7px);
    right: 20px;
    display: none;
    width: min(280px, calc(100vw - 32px));
    padding: 7px;
    gap: 3px;
    border: 1px solid #e2dcef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 20px 48px #25203c2b;
  }
  .site-header.site-menu-open .site-nav { display: grid; }
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 10px 12px;
    border-radius: 10px;
  }
  .site-nav a:hover,
  .site-nav a:focus-visible { color: #5d2bd7; background: #f5f0fc; }
  .site-menu-button {
    display: grid;
    place-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #ded3f4;
    border-radius: 11px;
    color: #7438fe;
    background: #f8f4ff;
    box-shadow: 0 3px 10px #3a285314;
  }
  .site-menu-button span {
    display: block;
    width: 21px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }
  .site-menu-button[aria-expanded="true"] { border-color: #7438fe; background: #eee6ff; }
  .header-resume-link:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid #d9cdf8;
    border-radius: 10px;
    color: #5f2fd0;
    background: #f8f4ff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
  }
  .header-resume-link:hover,
  .header-resume-link:focus-visible { border-color: #8255ff; background: #eee7ff; outline: none; }
  .site-nav .site-menu-cta {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 3px;
    color: #fff;
    background: linear-gradient(110deg, var(--purple), var(--blue));
  }
  .site-nav .site-menu-cta:hover,
  .site-nav .site-menu-cta:focus-visible { color: #fff; background: linear-gradient(110deg, #6e2ff0, #075de7); }
  .header-cta { display: none; }
  .hero { padding-top: 42px; }
  .maker-shell { grid-template-columns: 1fr; }
  .controls-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .shirt-stage { min-height: 470px; }
  .hero.workflow-active .workspace-header { grid-template-columns: 1fr auto; }
  .hero.workflow-active .workspace-prompt { grid-column: 1/-1; grid-row: 2; }
  .hero.workflow-active .preview-panel { grid-template-columns: 1fr; grid-template-areas: "results" "toolbar" "stage" "editor" "trust"; min-height: 0; }
  .hero.workflow-active .design-results { grid-template-columns: minmax(150px, .75fr) minmax(380px, 1.25fr); }
  .hero.workflow-active .shirt-stage { min-height: 500px; }
  .hero.workflow-active .design-editor { width: min(100%, 720px); justify-self: center; }
  .hero.workflow-active .editor-column { width: min(100%, 720px); justify-self: center; }
}

@media (max-width: 620px) {
  .site-header { height: 64px; padding: 0 17px; }
  .brand { font-size: 17px; }
  .site-header .brand-logo { height: 45px; }
  .header-resume-link:not([hidden]) { min-height: 34px; padding: 7px 9px; font-size: 10px; }
  .site-nav { right: 12px; }
  .hero:not(.workflow-active) .preview-panel { display: none; }
  .hero { padding: 24px 10px 44px; background: radial-gradient(circle at 75% 8%,#efefff 0,#fff 25%); }
  .hero-copy { margin-bottom: 14px; }
  .eyebrow { margin-bottom: 8px; font-size: 9px; }
  h1 { font-size: 41px; }
  .hero-copy > p:last-of-type { margin: 10px 0 13px; font-size: 14px; line-height: 1.45; }
  .value-strip { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; padding: 8px 4px; border-radius: 17px; }
  .value-strip > span { min-width: 0; padding: 0 6px; text-align: center; font-size: 8.5px; }
  .value-strip b { float: none; display: block; margin: 0 0 3px; }
  .maker-shell { min-height: 0; border-radius: 19px; }
  .controls-panel, .preview-panel { padding: 17px 14px; }
  .hero:not(.workflow-active) .product-pill { margin-bottom: 9px; padding: 6px 10px; }
  .hero:not(.workflow-active) .prompt-heading-row { margin-bottom: 5px; }
  .hero:not(.workflow-active) textarea { min-height: 88px; padding: 12px 38px 12px 13px; }
  .hero:not(.workflow-active) .prompt-spark { top: 12px; right: 13px; }
  .hero:not(.workflow-active) .prompt-meta { margin: 2px 0 -3px; }
  .hero:not(.workflow-active) .reference-upload { margin-bottom: 0; }
  .hero:not(.workflow-active) .product-options { gap: 7px; margin-bottom: 10px; }
  .hero:not(.workflow-active) .product-options label { gap: 5px; }
  .hero:not(.workflow-active) select { padding-top: 9px; padding-bottom: 9px; }
  .hero:not(.workflow-active) input[type="email"] { margin: 5px 0 9px; padding-top: 9px; padding-bottom: 9px; }
  .hero:not(.workflow-active) .saved-design-help { margin: 0 0 7px; font-size: 10px; line-height: 1.35; }
  .hero:not(.workflow-active) .rights-check { gap: 7px; font-size: 10px; line-height: 1.25; }
  .hero:not(.workflow-active) .primary-button { margin-top: 12px; padding: 12px 15px; }
  .hero:not(.workflow-active) .form-status:empty { display: none; }
  .style-grid { grid-template-columns: 1fr 1fr; }
  .reference-uses { grid-template-columns: 1fr; }
  .shirt-stage { min-height: 360px; }
  .shirt-canvas-viewport { width: 100%; }
  .design-grid { gap: 7px; }
  .editor-heading-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .editor-button-grid { grid-template-columns: 1fr 1fr; }
  .trust-row { flex-wrap: wrap; }
  .hero.workflow-active { padding: 10px 8px 42px; }
  .hero.workflow-active .maker-shell { min-height: 0; border-radius: 18px; }
  .hero.workflow-active .workspace-header { gap: 9px 14px; padding: 14px; }
  .hero.workflow-active .workspace-step h2 { font-size: 16px; }
  .hero.workflow-active .workspace-prompt { font-size: 10px; }
  .workspace-product-options { align-items: flex-start; gap: 12px; }
  .workspace-option-group { width: 100%; align-items: flex-start; flex-direction: column; gap: 6px; }
  .workspace-size-options { flex-wrap: wrap; }
  .workspace-size-options button { min-width: 34px; }
  .hero.workflow-active .preview-panel { gap: 10px; padding: 12px 10px; }
  .hero.workflow-active .design-results { display: block; padding: 12px; border-radius: 14px; }
  .hero.workflow-active .results-heading { align-items: center; }
  .hero.workflow-active .results-heading h3 { font-size: 16px; }
  .hero.workflow-active .design-grid { margin-top: 9px; gap: 6px; }
  .hero.workflow-active .design-card { aspect-ratio: 1; padding: 3px; border-radius: 11px; }
  .hero.workflow-active .shirt-stage { min-height: 390px; }
  .hero.workflow-active .design-editor { padding: 14px; border-radius: 14px; }
  .editor-heading-row { flex-direction: row; align-items: center; }
  .editor-heading-row h3 { font-size: 17px; }
  .quick-tools { gap: 5px; }
  .quick-tools button { padding: 8px 2px 7px; font-size: 7px; }
  .quick-tools button b { font-size: 13px; }
  .studio-drawers { grid-template-columns: 1fr; }
  .hero.workflow-active .continue-button { position: sticky; z-index: 5; bottom: 8px; }
  .how-it-works { grid-template-columns: 1fr; padding: 0 14px; margin-bottom: 55px; }
  footer { margin: 0 14px; padding: 23px 0; gap: 18px; align-items: flex-start; }

  /* Compact mobile Step 2: preserve desktop proportions while keeping the
     favorites, active shirt, and primary tools within the first viewport. */
  body:has(.hero.workflow-active) .site-header { height: 48px; padding: 0 11px; }
  body:has(.hero.workflow-active) .site-header .brand { gap: 7px; font-size: 14px; }
  body:has(.hero.workflow-active) .site-header .brand-logo { height: 38px; }
  body:has(.hero.workflow-active) .site-header .header-cta { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 9px; }

  .hero.workflow-active { padding: 5px 4px 26px; }
  .hero.workflow-active .maker-shell { border-radius: 13px; }
  .hero.workflow-active .workspace-header { grid-template-columns: minmax(0, 1fr) auto; gap: 3px 9px; padding: 8px 10px; }
  .hero.workflow-active .workspace-step { gap: 7px; min-width: 0; }
  .hero.workflow-active .workspace-step > span { width: 21px; height: 21px; font-size: 8px; }
  .hero.workflow-active .workspace-step p { display: none; }
  .hero.workflow-active .workspace-step h2 { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .hero.workflow-active .workspace-prompt { display: none; }
  .hero.workflow-active .start-over-button { padding: 6px 8px; border-radius: 8px; font-size: 8px; }

  .hero.workflow-active .preview-panel { gap: 7px; padding: 8px 7px 12px; }
  .hero.workflow-active .preview-panel { grid-template-areas: "results" "toolbar" "stage" "editor" "trust"; }
  .hero.workflow-active.generation-active .generation-progress { z-index: 9; }
  .hero.workflow-active.editor-open .canvas-toolbar { grid-area: toolbar; z-index: 8; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 7px; min-height: 34px; padding: 0 2px; }
  .hero.workflow-active.editor-open .change-design-button,
  .hero.workflow-active.editor-open .preview-mode-button { display: inline-flex; align-items: center; }
  .hero.workflow-active.editor-open .change-design-button { justify-self: start; }
  .hero.workflow-active.editor-open .preview-mode-button { justify-self: end; }
  .hero.workflow-active.editor-open .canvas-price { display: inline-flex; padding: 6px 8px; font-size: 10px; }
  .hero.workflow-active.editor-open .design-results { display: none; }
  .hero.workflow-active.editor-open.mobile-choosing .design-results { display: block; }
  .hero.workflow-active.editor-open.mobile-choosing .shirt-stage,
  .hero.workflow-active.editor-open.mobile-choosing .editor-column { display: none; }
  .hero.workflow-active.preview-mode .change-design-button,
  .hero.workflow-active.preview-mode .canvas-price { visibility: hidden; }
  .hero.workflow-active.preview-mode .preview-mode-button { border-color: #c9cfe0; color: #303b52; background: #fff; }
  .hero.workflow-active.preview-mode .print-area-guide { opacity: 0 !important; }
  .hero.workflow-active.preview-mode .shirt-stage { height: calc(100vw - 14px); min-height: calc(100vw - 14px); max-height: 470px; }
  .hero.workflow-active.preview-mode .shirt-canvas-viewport { width: calc(100vw - 14px); max-width: 470px; }

  .hero.workflow-active .design-results { padding: 8px; border-radius: 11px; }
  .hero.workflow-active .results-heading h3 { margin-top: 0; font-size: 14px; }
  .hero.workflow-active .results-heading > span { font-size: 7px; }
  .hero.workflow-active .editor-kicker { font-size: 6px; }
  .hero.workflow-active .design-grid { margin-top: 6px; gap: 5px; }
  .hero.workflow-active .design-card { aspect-ratio: 1.45; padding: 2px; border-width: 1px; border-radius: 9px; }
  .hero.workflow-active .design-card.selected { box-shadow: 0 0 0 2px #7a39ff18; }
  .hero.workflow-active .design-card.selected::after { top: 4px; right: 4px; width: 17px; height: 17px; font-size: 8px; }

  .hero.workflow-active .shirt-stage { height: 255px; min-height: 255px; border-radius: 11px; }
  .hero.workflow-active .side-preview-toggle { right: auto; top: auto; bottom: auto; width: 112px; height: 130px; }
  .hero.workflow-active .side-preview-shirt { top: -7px; width: 110px; height: 97px; }
  .hero.workflow-active .side-preview-rotation { right: 5px; width: 96px; height: 96px; }
  .hero.workflow-active .side-preview-label { min-width: 90px; padding: 6px 3px; font-size: 14px; }
  .hero.workflow-active .canvas-zoom-controls { left: 6px; width: 72px; height: 44px; }
  .hero.workflow-active .canvas-zoom-controls img { width: 20px; height: 20px; }
  .hero.workflow-active .back-empty-actions { gap: 5px; width: min(50%, 150px); padding: 9px 9px 10px; border-radius: 14px; }
  .hero.workflow-active .back-empty-actions > strong { font-size: 11px; }
  .hero.workflow-active .back-action-options { gap: 2px; }
  .hero.workflow-active .back-action-options button { gap: 2px; min-height: 55px; padding: 2px 1px 3px; border-radius: 9px; font-size: 8px; }
  .hero.workflow-active .back-action-options img { width: 38px; height: 38px; }
  .hero.workflow-active .shirt-canvas-viewport { width: 255px; max-width: 100%; }
  .hero.workflow-active.results-ready:not(.editor-open) .shirt-stage { height: 178px; min-height: 178px; }
  .hero.workflow-active.results-ready:not(.editor-open) .shirt-canvas-viewport { width: 180px; }
  .hero.workflow-active:not(.results-ready) .shirt-stage { height: 230px; min-height: 230px; }
  .hero.workflow-active:not(.results-ready) .shirt-canvas-viewport { width: 230px; }
  .hero.workflow-active.generation-active:not(.results-ready) .shirt-stage { height: 300px; min-height: 300px; }
  .hero.workflow-active.generation-active:not(.results-ready) .shirt-canvas-viewport { width: 285px; opacity: .38; }
  .hero.workflow-active .stage-glow { width: 260px; height: 260px; }

  .hero.workflow-active .design-editor { padding: 10px; border-radius: 11px; }
  .hero.workflow-active .editor-heading-row { margin-bottom: 8px; }
  .hero.workflow-active .editor-heading-row h3 { font-size: 14px; }
  .hero.workflow-active .editor-help { font-size: 7px; }
  .hero.workflow-active .editor-controls { gap: 8px; }
  .hero.workflow-active .quick-tools { gap: 4px; }
  .hero.workflow-active .quick-tools button { padding: 6px 1px 5px; border-radius: 8px; font-size: 6px; }
  .hero.workflow-active .quick-tools button b { margin-bottom: 1px; font-size: 11px; }
  .hero.workflow-active .studio-drawer summary { padding: 7px 8px; font-size: 8px; }
  .hero.workflow-active .studio-drawer summary b { width: 18px; height: 18px; font-size: 8px; }
  .hero.workflow-active .editor-note { display: none; }
  .hero.workflow-active .trust-row { display: none; }
  .hero.workflow-active .workspace-action { margin-top: 1px; }
  .hero.workflow-active .continue-button { bottom: 4px; padding: 10px; font-size: 11px; }
  .confirm-dialog { padding: 23px 20px 20px; border-radius: 17px; }
  .confirm-dialog-actions { grid-template-columns: 1fr; }
  .confirm-dialog-actions .confirm-danger { grid-row: 1; }
  .design-ready-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 13px; border-radius: 18px; }
  .design-ready-dialog > header { grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 7px; margin-bottom: 10px; }
  .design-ready-dialog h2 { font-size: 21px; }
  .design-ready-spark { font-size: 27px; }
  .design-ready-dialog > header > button { width: 36px; height: 36px; font-size: 29px; }
  .design-ready-artwork { max-height: calc(100dvh - 170px); border-radius: 14px; }
  .design-ready-action { margin-top: 10px; padding: 13px; border-radius: 11px; font-size: 14px; }
  .shirt-info-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 13px; border-radius: 18px; }
  .shirt-info-dialog > header { grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 7px; margin-bottom: 10px; }
  .shirt-info-mark { width: 32px; height: 32px; font-size: 16px; }
  .shirt-info-dialog h2 { font-size: 21px; }
  .shirt-info-dialog > header > button { width: 36px; height: 36px; font-size: 29px; }
  .shirt-info-preview { min-height: 210px; max-height: 42dvh; border-radius: 14px; }
  .shirt-info-preview img { max-height: 42dvh; }
  .shirt-info-copy { padding-top: 13px; }
  .shirt-info-copy p { font-size: 12px; line-height: 1.55; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shirt-workspace.shirt-turn-out, .shirt-workspace.shirt-turn-in { animation: none; }
}

/* Compact creator workspace with responsive tool drawers. */
.hero.workflow-active.editor-open .preview-panel {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(430px, 1fr) auto auto auto;
  grid-template-areas: "toolbar" "stage" "editor" "trust";
  gap: 10px;
  min-height: 0;
}
.hero.workflow-active.editor-open .design-results { display: none; }
.hero.workflow-active.editor-open .shirt-stage { min-height: clamp(470px, 58vh, 620px); }
.hero.workflow-active.editor-open .shirt-canvas-viewport { width: min(88%, 570px); }
.hero.workflow-active.editor-open .editor-column {
  grid-area: editor;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(100%, 920px);
  justify-self: center;
}
.hero.workflow-active.editor-open .design-editor {
  width: 100%;
  padding: 9px;
  border-radius: 14px;
  box-shadow: 0 8px 20px #2532540a;
}
.quick-tools { gap: 7px; }
.quick-tools button {
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 7px 4px;
  font-size: 9px;
}
.quick-tools button img { width: 25px; height: 25px; pointer-events: none; }
.quick-tools button span { pointer-events: none; }
.editor-action-message { margin: 7px 4px 0; }

.primary-tool-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px #25325410;
}
.primary-tool-dock > button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-height: 104px;
  padding: 10px 7px;
  border: 1px solid #dce2ee;
  border-radius: 16px;
  color: #202a40;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.primary-tool-dock > button img { width: 43px; height: 43px; object-fit: contain; pointer-events: none; }
.primary-tool-dock > button span { pointer-events: none; }
.primary-tool-dock > button:hover,
.primary-tool-dock > button.active {
  border-color: var(--purple);
  color: #6530db;
  background: #f7f3ff;
  box-shadow: 0 0 0 2px #7a39ff12;
  transform: translateY(-1px);
}

.tool-panel-backdrop { display: none; }
.tool-panel-shell {
  position: absolute;
  z-index: 25;
  top: 68px;
  right: 20px;
  width: min(390px, calc(100% - 40px));
  max-height: calc(100% - 88px);
  overflow: hidden;
  border: 1px solid #dce2ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px #1e293b33;
  opacity: 0;
  transform: translateX(calc(100% + 36px));
  transition: transform .2s ease, opacity .2s ease;
}
.tool-panel-shell.open { opacity: 1; transform: translateX(0); }
.tool-panel-shell > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid #e7eaf1;
}
.tool-panel-shell > header h3 { margin: 2px 0 0; font: 700 19px "Space Grotesk"; }
.tool-panel-shell > header > button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #4c5870;
  background: #f8f9fc;
  font-size: 22px;
}
.tool-panel {
  max-height: min(570px, calc(100vh - 210px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 15px;
}
.tool-panel > label { display: block; margin-bottom: 7px; }
.tool-panel textarea { min-height: 92px; resize: vertical; }
.ai-prompt-composer { position: relative; }
.ai-prompt-composer textarea { display: block; width: 100%; min-height: 118px; padding-bottom: 49px; }
.ai-prompt-reference-controls { position: absolute; z-index: 3; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px); pointer-events: auto; }
.ai-prompt-reference-controls.has-reference { gap: 2px; min-height: 40px; padding: 3px 24px 3px 3px; border: 1px solid #d3daea; border-radius: 11px; background: #fffffff2; box-shadow: 0 3px 10px #25325414; }
.ai-prompt-composer .reference-image-button { min-width: 0; max-width: 150px; padding: 7px 10px; overflow: hidden; border-color: #d8dfee; border-radius: 9px; background: #fffffff2; box-shadow: 0 2px 8px #25325412; text-overflow: ellipsis; white-space: nowrap; }
.ai-prompt-composer .reference-image-button.reference-thumbnail-button { width: 36px; height: 32px; padding: 1px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
.ai-prompt-composer .reference-image-button.reference-thumbnail-button img { display: block; width: 100%; height: 100%; border-radius: 5px; object-fit: cover; }
.ai-reference-toggle-button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 6px; border: 0; border-radius: 7px; color: #465168; background: transparent; font-size: 9px; font-weight: 800; }
.ai-reference-toggle-button strong { min-width: 27px; padding: 3px 5px; border-radius: 999px; color: #fff; background: #6c3ce7; font-size: 8px; text-transform: uppercase; }
.ai-reference-toggle-button.reference-off strong { color: #667085; background: #e7eaf0; }
.ai-reference-help-button { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 1px solid #cbd3e3; border-radius: 50%; color: #657087; background: #fff; font-size: 9px; font-weight: 900; box-shadow: 0 2px 5px #25325418; }
.ai-reference-help { position: absolute; z-index: 4; left: 10px; bottom: 51px; width: min(270px, calc(100% - 20px)); margin: 0; padding: 8px 10px; border: 1px solid #dfe3ec; border-radius: 9px; color: #4d5870; background: #fff; font-size: 9px; line-height: 1.4; box-shadow: 0 7px 20px #2532541c; }
.ai-reference-help[hidden] { display: none; }
.ai-reference-upload {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #e1e5ef;
  border-radius: 12px;
  background: #fafbfe;
}
.ai-reference-upload[hidden] { display: none; }
.ai-reference-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 1px 0;
  color: #465168;
  font-size: 10px;
  font-weight: 700;
}
.ai-reference-toggle[hidden] { display: none; }
.ai-reference-toggle input { accent-color: var(--purple); }
.ai-reference-upload .reference-status { margin-bottom: 0; }
.panel-primary-button {
  width: 100%;
  margin-top: 10px;
  padding: 11px 13px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(105deg, var(--purple), var(--blue));
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 18px #663cff24;
}
.panel-primary-button:disabled { cursor: wait; opacity: .55; }
.native-upload-button {
  position: relative;
  display: block;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
}
.native-upload-button input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.ai-generation-progress {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 0 0 12px;
  padding: 10px 12px 12px;
  overflow: hidden;
  border: 1px solid #d9d3f4;
  border-radius: 14px;
  color: #27334d;
  background: linear-gradient(145deg, #f5f2ff, #eef5ff);
  text-align: center;
  box-shadow: 0 10px 24px #20283f26;
}
.ai-generation-progress[hidden] { display: none; }
.ai-generation-progress .shirt-factory-animation {
  width: min(100%, 250px);
  max-height: 145px;
}
.ai-generation-progress strong { font: 700 13px "Space Grotesk"; }
.ai-generation-progress > span { color: #68758d; font-size: 9px; line-height: 1.35; }
.panel-status { min-height: 16px; margin: 7px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.panel-summary,
.artwork-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-summary { padding: 2px 1px 10px; }
.panel-summary small,
.artwork-history-heading span { color: #7b8599; font-size: 9px; }
.artwork-history-heading { margin: 15px 0 8px; }
.artwork-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.artwork-history-grid .design-card { touch-action: pan-y; }
.artwork-history-item { position: relative; min-width: 0; }
.artwork-history-media { position: relative; }
.artwork-prompt-button { position: absolute; z-index: 3; right: 8px; bottom: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #dce2ed; border-radius: 50%; color: #5b6579; background: #fffffff0; box-shadow: 0 3px 10px #2734581a; cursor: pointer; }
.artwork-prompt-button:hover, .artwork-prompt-button[aria-expanded="true"] { border-color: #a98cff; color: #6730df; background: #f5f1ff; }
.artwork-prompt-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.artwork-reference-button { position: absolute; z-index: 3; left: 8px; bottom: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; overflow: hidden; border: 1px solid #dce2ed; border-radius: 50%; background: #fffffff0; box-shadow: 0 3px 10px #2734581a; cursor: pointer; }
.artwork-reference-button img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.artwork-prompt-details { position: relative; display: grid; gap: 7px; margin-top: 7px; padding: 10px 34px 9px 9px; border: 1px solid #e1e5ee; border-radius: 10px; background: #f8f9fc; }
.artwork-prompt-details[hidden] { display: none; }
.artwork-prompt-details p { margin: 0; color: #4e596f; font-size: 9px; line-height: 1.45; }
.artwork-prompt-details button { border: 1px solid #d8ccff; color: #6730df; background: #fff; font-weight: 900; cursor: pointer; }
.artwork-prompt-details .artwork-prompt-reuse { justify-self: end; padding: 6px 10px; border-radius: 8px; font-size: 9px; }
.artwork-prompt-details .artwork-prompt-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-color: #dfe3ec; border-radius: 50%; color: #687389; font-size: 17px; line-height: 1; }
.artwork-history-item .design-card { width: 100%; aspect-ratio: 1; margin: 0; }
.artwork-usage-badges {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  display: grid;
  justify-items: start;
  gap: 4px;
  pointer-events: none;
}
.artwork-usage-badges > span {
  padding: 4px 7px;
  border: 1px solid #d8ccff;
  border-radius: 999px;
  color: #5729c5;
  background: #f7f3fff2;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 10px #24304c1f;
  backdrop-filter: blur(5px);
}
.artwork-preview-button {
  position: absolute;
  z-index: 2;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d7deea;
  border-radius: 50%;
  color: #536078;
  background: #fffffff2;
  box-shadow: 0 4px 12px #24304c24;
  backdrop-filter: blur(5px);
}
.artwork-preview-button:hover { border-color: var(--purple); color: #6530db; background: #f5f1ff; }
.artwork-preview-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.artwork-delete-button {
  width: 100%;
  min-height: 34px;
  margin-top: 5px;
  padding: 6px 9px;
  border: 1px solid #edc9cf;
  border-radius: 9px;
  color: #a73748;
  background: #fff9fa;
  font-size: 10px;
  font-weight: 800;
}
.artwork-delete-button:hover { border-color: #d65a6c; background: #fff0f2; }
.artwork-delete-button:disabled { cursor: not-allowed; opacity: .32; }
.artwork-delete-button.artwork-in-use:disabled {
  border-color: #dfe5f1;
  color: #5c6880;
  background: #f6f8fc;
  opacity: 1;
}
.upload-panel-copy { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 13px; }
.upload-panel-copy > img { width: 58px; height: 58px; }
.upload-panel-copy p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.tool-panel .workspace-product-options,
.tool-panel .editor-text-tools { padding: 4px 0 0; }
.layers-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  min-height: 34px;
  margin: 8px auto 0;
  padding: 6px 12px;
  border: 1px solid #d9dfeb;
  border-radius: 999px;
  color: #46536a;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 5px 14px #2532540d;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.layers-button:hover,
.layers-button.active {
  border-color: var(--purple);
  color: #6530db;
  background: #f7f3ff;
  box-shadow: 0 0 0 2px #7a39ff12;
}
.layers-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.layers-button strong { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: #6530db; background: #efe9ff; font-size: 9px; }
.layer-undo-toast {
  position: fixed;
  z-index: 55;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 28px);
  padding: 10px 12px 10px 15px;
  border-radius: 12px;
  color: #fff;
  background: #20283a;
  box-shadow: 0 15px 38px #0f172a4d;
  font-size: 11px;
  font-weight: 700;
  transform: translateX(-50%);
}
.layer-undo-toast button { padding: 5px 9px; border: 0; border-radius: 7px; color: #fff; background: #7650ef; font-size: 10px; font-weight: 900; }
.layers-panel-intro { margin-bottom: 12px; }
.layers-panel-intro p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.layers-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.layer-list-item {
  display: grid;
  grid-template-columns: 28px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #dfe4ee;
  border-left: 4px solid var(--layer-accent, #7a39ff);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px #25325408;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.layer-list-item.selected { border-color: var(--layer-accent, var(--purple)); background: #faf8ff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--layer-accent, #7a39ff) 18%, transparent); }
.layer-list-item.fx-layer-locked { background: #f7f8fb; }
.layer-list-item.fx-layer-locked .layer-thumbnail,
.layer-list-item.fx-layer-locked .layer-info { opacity: .62; }
.layer-list-item.layer-hidden { opacity: .58; }
.layer-list-item.dragging { opacity: .72; border-color: var(--purple); box-shadow: 0 9px 24px #5530c329; }
.layer-drag-handle {
  width: 28px;
  height: 40px;
  padding: 0;
  border: 0;
  color: #8a94a8;
  background: transparent;
  font-size: 18px;
  letter-spacing: -4px;
  cursor: grab;
  touch-action: none;
}
.layer-drag-handle:active { cursor: grabbing; }
.layer-thumbnail {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #e2e6ef;
  border-radius: 9px;
  background: linear-gradient(135deg, #f7f8fb, #eceff5);
}
.layer-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.layer-thumbnail-text { display: grid; place-items: center; width: 100%; height: 100%; font: 900 22px "Space Grotesk"; text-shadow: 0 1px 2px #0003; }
.layer-info { min-width: 0; }
.layer-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 5px;
  width: min(100%, 270px);
}
.layer-name-input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 4px 8px;
  border: 1px solid #d9dfeb;
  border-radius: 7px;
  color: #202a40;
  background: #f8f9fc;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  cursor: default;
  pointer-events: none;
}
.layer-list-item.renaming .layer-name-input {
  border-color: #8a52f5;
  outline: 3px solid #7540f414;
  background: #fff;
  cursor: text;
  pointer-events: auto;
}
.layer-name-edit {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d9dfeb;
  border-radius: 7px;
  color: #6551a8;
  background: #f8f6ff;
}
.layer-name-edit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.layer-name-edit:hover,
.layer-name-edit:focus-visible { border-color: #8a52f5; color: #5c2bd4; background: #f0eaff; }
.layer-info small { display: block; margin: 2px 4px 0; color: #8790a2; font-size: 8px; }
.layer-actions { display: grid; grid-template-columns: repeat(2, 30px); gap: 4px; }
.layer-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #e0e5ef;
  border-radius: 8px;
  color: #58657a;
  background: #f9fafc;
  font-size: 14px;
}
.layer-actions button:hover { border-color: #cbbcf8; color: #6530db; background: #f7f3ff; }
.layer-actions button:disabled { cursor: not-allowed; opacity: .28; }
.layer-actions .layer-delete { color: #aa4050; }
.layer-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.layers-empty { margin: 18px 5px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.asset-history-section { margin-top: 16px; padding-top: 13px; border-top: 1px solid #e1e5ee; }
.asset-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.asset-history-heading strong { font: 700 14px "Space Grotesk"; }
.asset-history-heading span { color: #7b8599; font-size: 8px; text-transform: uppercase; }
.asset-history-list { display: grid; gap: 7px; }
.asset-history-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid #e0e5ef; border-radius: 11px; background: #fff; }
.asset-history-preview { display: grid; place-items: center; overflow: hidden; width: 48px; height: 48px; border-radius: 8px; background: #f2f4f8; }
.asset-history-preview img { width: 100%; height: 100%; object-fit: contain; }
.asset-history-text-preview { padding: 4px; font-size: 15px; font-weight: 800; line-height: 1.05; text-align: center; }
.asset-history-copy { min-width: 0; }
.asset-history-copy strong, .asset-history-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-history-copy strong { font-size: 10px; }
.asset-history-copy small { margin-top: 2px; color: #7c869a; font-size: 8px; }
.asset-history-actions { display: grid; gap: 4px; }
.asset-history-actions button { min-width: 54px; padding: 6px 8px; border: 1px solid #d8ccff; border-radius: 7px; color: #6730df; background: #faf8ff; font-size: 8px; font-weight: 900; cursor: pointer; }
.asset-history-actions .asset-history-delete { border-color: #f0d3d8; color: #aa4050; background: #fff9fa; }
.asset-history-empty { margin: 10px 2px; color: #7c869a; font-size: 9px; }
.asset-history-empty[hidden] { display: none; }
.reference-preview-dialog { width: min(calc(100% - 28px), 470px); padding: 14px; border: 1px solid #e0e4ef; border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 30px 90px #151d3547; }
.reference-preview-dialog::backdrop { background: #17203a99; backdrop-filter: blur(5px); }
.reference-preview-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.reference-preview-dialog h2 { margin: 0; font: 700 21px "Space Grotesk"; }
.reference-preview-dialog header button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #dfe3ec; border-radius: 10px; color: #687389; background: #f8f9fc; font-size: 24px; }
.reference-preview-dialog-image { display: grid; place-items: center; overflow: hidden; aspect-ratio: 1; border-radius: 14px; background: #f1f3f7; }
.reference-preview-dialog-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.reference-preview-dialog > p { margin: 14px 0 10px; font: 700 17px "Space Grotesk"; text-align: center; }
.reference-preview-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reference-preview-dialog-actions button { padding: 11px; border: 1px solid #dfe3ec; border-radius: 10px; color: #4d5870; background: #f8f9fc; font-size: 11px; font-weight: 900; }
.reference-preview-dialog-actions button:last-child { border-color: transparent; color: #fff; background: linear-gradient(135deg, #7a39ff, #126dff); }
.hero.workflow-active.editor-open .workspace-action { width: min(100%, 620px); justify-self: center; }

.text-fx-toolbar {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dcdff0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px #2532541c;
}
.text-fx-toolbar[hidden] { display: none; }
.text-fx-toolbar-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.text-fx-toolbar-header > div { min-width: 0; }
.text-fx-toolbar-header span { display: block; color: #7440ed; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.text-fx-toolbar-header strong { display: block; overflow: hidden; margin-top: 2px; color: #242e43; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
#exit-text-fx-mode { display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 10px; color: #fff; background: #566070; font-size: 9px; font-weight: 900; box-shadow: 0 7px 18px #25304724; }
#exit-text-fx-mode:hover,
#exit-text-fx-mode:focus-visible { background: #454f60; }
.text-fx-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
#toggle-text-fx-images { flex: none; min-height: 38px; padding: 8px 10px; border: 1px solid #dcdff0; border-radius: 10px; color: #5d35c8; background: #f7f3ff; font-size: 8px; font-weight: 900; }
#toggle-text-fx-images[aria-pressed="true"] { color: #fff; background: #6740db; }
.effect-color-picker { width: 42px; height: 34px; border: 1px solid #dfe3ec; border-radius: 8px; background: #fff; }
.effect-color-picker .text-color-trigger > span { width: 20px; height: 20px; }
.text-fx-popover-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 5px; }
.text-fx-popover-header strong { color: #465168; font-size: 8px; }
.text-fx-popover-header button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid #dfe3ec; border-radius: 7px; color: #657086; background: #fff; font-size: 16px; line-height: 1; }
.text-fx-message { margin: 0; padding: 8px 10px; border: 1px solid #f0cf98; border-radius: 9px; color: #7d4a08; background: #fff9ed; font-size: 9px; font-weight: 800; text-align: center; }
.text-fx-message[hidden] { display: none; }
.text-fx-basic-slot .canvas-text-editor {
  position: relative;
  left: auto !important;
  top: auto !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: none;
  padding: 6px;
  transform: none !important;
  box-shadow: 0 5px 16px #25325412;
}
.text-fx-basic-slot .canvas-text-effects-toggle { display: none; }
.text-fx-effects-slot .canvas-text-effects {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-height: none !important;
  padding: 9px;
  overflow: visible;
  transform: none;
  box-shadow: none;
  background: #faf9ff;
}
.text-fx-effects-slot .text-effect-heading { display: none; }
.text-fx-effects-slot .canvas-text-effects > label { grid-template-columns: minmax(70px, auto) minmax(0, 1fr); }
.text-fx-effects-slot .canvas-text-effects > label:first-of-type { grid-column: 1 / -1; }
.text-fx-layers-slot { display: flex; justify-content: center; }
.text-fx-layers-slot .layers-button { position: static !important; margin: 0 !important; transform: none !important; }
.hero.text-fx-mode .canvas-toolbar,
.hero.text-fx-mode .design-editor,
.hero.text-fx-mode .primary-tool-dock,
.hero.text-fx-mode .workspace-action { display: none !important; }
.hero.text-fx-mode .text-fx-mode-button {
  border-color: #566070;
  background: #566070;
  box-shadow: 0 7px 18px #25304724;
}
.hero.text-fx-mode .side-preview-toggle { visibility: hidden; }

@media (min-width: 981px) {
  .hero.workflow-active.editor-open.text-fx-mode .preview-panel {
    grid-template-columns: minmax(420px, 1fr) minmax(340px, 400px);
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "stage panel";
    gap: 12px;
  }
  .hero.workflow-active.editor-open.text-fx-mode .text-fx-toolbar {
    grid-area: panel;
    align-self: stretch;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .hero.workflow-active.editor-open.text-fx-mode .shirt-stage { grid-area: stage; }
}

@media (max-width: 620px) {
  .text-fx-mode-button { bottom: 4%; min-height: 36px; padding: 7px 13px; }
  .hero.workflow-active.editor-open.text-fx-mode .preview-panel {
    grid-template-rows: 372px auto !important;
    grid-template-areas: "stage" "editor" !important;
  }
  .hero.workflow-active.editor-open.text-fx-mode .editor-column { position: relative; bottom: auto; margin-top: -6px; }
  .text-fx-toolbar { gap: 7px; padding: 8px; border-radius: 13px; }
  .text-fx-toolbar-header { align-items: stretch; }
  #exit-text-fx-mode { min-height: 40px; }
  .text-fx-effects-slot .canvas-text-effects { grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px; }
  .text-fx-effects-slot .canvas-text-effects > label { grid-template-columns: 76px minmax(0, 1fr); font-size: 8px; }
  .hero.workflow-active.editor-open .preview-panel {
    grid-template-rows: auto 1fr auto auto;
    gap: 6px;
    padding-bottom: 8px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage {
    height: 372px;
    min-height: 372px;
    place-items: start center;
    border: 1px solid #dfe4ef;
    border-bottom: 0;
    border-radius: 11px 11px 0 0;
    background: #eef1f8;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage::after {
    content: "";
    position: absolute;
    z-index: 2;
    right: 7px;
    bottom: 3px;
    left: 7px;
    height: 91px;
    border: 1px solid #dfe4ef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px #2532541f, 0 -5px 18px #25325410;
  }
  .hero.workflow-active.editor-open .shirt-canvas-viewport { width: 300px; }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-canvas-viewport { z-index: 3; }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-canvas-viewport::after {
    content: "";
    position: absolute;
    z-index: 5;
    right: 25%;
    bottom: 1px;
    left: 25%;
    height: 15px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #11182740 0%, #11182722 42%, transparent 74%);
    filter: blur(3px);
    pointer-events: none;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .editor-column { gap: 6px; width: 100%; margin-top: -6px; }
  .hero.workflow-active.editor-open:not(.preview-mode) .design-editor {
    padding: 6px;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px #2532540a;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .canvas-zoom-controls { z-index: 10; }
  .hero.workflow-active.editor-open:not(.preview-mode) .side-preview-toggle { z-index: 10; }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage > .layers-button {
    position: absolute;
    z-index: 10;
    top: 315px;
    left: 50%;
    min-width: 118px;
    min-height: 44px;
    margin: 0;
    padding: 7px 12px;
    font-size: 10px;
    transform: translateX(-50%);
  }
  .layers-button { min-height: 32px; margin-top: 5px; padding: 5px 11px; font-size: 10px; }
  .quick-tools { gap: 4px; }
  .hero.workflow-active .quick-tools button {
    min-height: 48px;
    padding: 5px 1px 4px;
    border-radius: 8px;
    font-size: 7px;
  }
  .hero.workflow-active .quick-tools button img { width: 21px; height: 21px; }
  .primary-tool-dock { gap: 5px; padding: 6px; border-radius: 12px; }
  .primary-tool-dock > button {
    min-height: 73px;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 11px;
    font-size: 9px;
  }
  .primary-tool-dock > button img { width: 32px; height: 32px; }
  .tool-panel-backdrop {
    position: fixed;
    z-index: 39;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #10162970;
    backdrop-filter: blur(2px);
    transition: background .2s ease, backdrop-filter .2s ease;
  }
  .tool-panel-backdrop.sheet-compact { background: #1016293d; backdrop-filter: blur(1px); }
  .tool-panel-backdrop.sheet-peek { pointer-events: none; background: transparent; backdrop-filter: none; }
  .tool-panel-shell {
    position: fixed;
    z-index: 40;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: var(--tool-sheet-height, min(72dvh, 620px));
    max-height: calc(100dvh - 8px);
    border-radius: 20px 20px 0 0;
    opacity: 1;
    transform: translateY(105%);
    will-change: height, transform;
    transition: height .24s cubic-bezier(.22, .8, .24, 1), transform .2s ease;
  }
  .tool-panel-shell.dragging { transition: none; user-select: none; }
  .tool-panel-shell.settling { transition: height .24s cubic-bezier(.22, .8, .24, 1), transform .2s ease; }
  .tool-panel-shell[hidden] { display: none; }
  .tool-panel-shell.open { transform: translateY(0); }
  .tool-panel-shell > header {
    min-height: 68px;
    padding: 17px 15px 10px;
    cursor: ns-resize;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .tool-panel-shell > header::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #d5d9e3;
    transform: translateX(-50%);
  }
  .tool-panel-shell.dragging > header::before { width: 52px; background: #8b5cf6; }
  .tool-panel { min-height: 0; max-height: none; padding: 13px 13px calc(24px + env(safe-area-inset-bottom)); }
  .artwork-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .artwork-delete-button { min-height: 38px; font-size: 11px; }
  .layer-list-item { grid-template-columns: 32px 46px minmax(0, 1fr) auto; gap: 7px; padding: 9px 7px; }
  .layer-drag-handle { width: 32px; height: 46px; }
  .layer-thumbnail { width: 46px; height: 46px; }
  .layer-actions { grid-template-columns: repeat(2, 36px); }
  .layer-actions button { width: 36px; height: 36px; }
  .layer-name-row { grid-template-columns: minmax(0, 1fr) 34px; width: 100%; }
  .layer-name-input { height: 34px; font-size: 12px; }
  .layer-name-edit { width: 34px; height: 34px; }
  .layer-name-edit svg { width: 17px; height: 17px; }
  .layer-info small { font-size: 9px; }
  .layer-undo-toast { bottom: 12px; min-height: 44px; font-size: 12px; }
  .hero.workflow-active.editor-open .workspace-action { width: 100%; }
}

/* Desktop overrides are intentionally last so the stacked editor rules above
   remain the source of truth for screens up to 980px. */
@media (min-width: 981px) {
  body:has(.hero.workflow-active.editor-open) { overflow: hidden; background: #f5f7fc; }
  body:has(.hero.workflow-active.editor-open) .site-header {
    width: 100%; max-width: none; min-height: 60px; padding: 8px 24px;
  }
  .hero.workflow-active.editor-open {
    height: calc(100dvh - 60px); min-height: 0; padding: 10px 14px; overflow: hidden;
  }
  .hero.workflow-active.editor-open .maker-shell {
    grid-template-rows: auto minmax(0, 1fr); width: 100%; max-width: 1600px;
    height: 100%; min-height: 0; border-radius: 18px;
  }
  .hero.workflow-active.editor-open .workspace-header {
    min-height: 56px; padding: 9px 16px; gap: 12px;
  }
  .hero.workflow-active.editor-open .workspace-header h2 {
    font-size: clamp(19px, 1.55vw, 24px);
  }
  .hero.workflow-active.editor-open .preview-panel {
    grid-template-columns: 96px minmax(0, 1fr) 0;
    grid-template-rows: 44px minmax(0, 1fr) 50px;
    grid-template-areas: "toolbar toolbar toolbar" "dock stage stage" "dock action action";
    column-gap: 12px; row-gap: 10px; height: 100%; min-height: 0;
    padding: 10px 12px 12px; overflow: hidden;
    transition: grid-template-columns .2s ease;
  }
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-columns: 96px minmax(420px, 1fr) minmax(330px, 380px);
    grid-template-areas: "toolbar toolbar toolbar" "dock stage panel" "dock action panel";
  }
  .hero.workflow-active.editor-open .canvas-toolbar {
    grid-area: toolbar; display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; width: 100%; min-height: 44px; padding: 0;
  }
  .hero.workflow-active.editor-open .change-design-button {
    display: inline-flex !important; justify-self: start;
  }
  .hero.workflow-active.editor-open .price-pill { justify-self: center; }
  .hero.workflow-active.editor-open .preview-toggle { justify-self: end; }
  .hero.workflow-active.editor-open .canvas-price { justify-self: center; }
  .hero.workflow-active.editor-open .preview-mode-button { justify-self: end; }
  .hero.workflow-active.editor-open .shirt-stage {
    grid-area: stage; align-self: stretch; width: 100%; height: 100%;
    min-height: 0; border-radius: 16px;
  }
  .hero.workflow-active.editor-open .shirt-canvas-viewport {
    width: min(100%, calc(100dvh - 220px), 680px) !important;
    max-width: 100%; max-height: 100%;
  }
  .hero.workflow-active.editor-open .editor-column { display: contents !important; }
  .hero.workflow-active.editor-open .primary-tool-dock {
    grid-area: dock; display: grid; grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr)); align-self: stretch;
    width: 96px; min-height: 0; padding: 7px; gap: 7px; border-radius: 14px;
  }
  .hero.workflow-active.editor-open .primary-tool-dock > button {
    min-height: 0; padding: 7px 3px; gap: 4px; border-radius: 11px;
    font-size: 10px; line-height: 1.15;
  }
  .hero.workflow-active.editor-open .primary-tool-dock > button img {
    width: clamp(28px, 4.2vh, 36px); height: clamp(28px, 4.2vh, 36px);
  }
  .hero.workflow-active.editor-open .design-editor {
    grid-area: stage; z-index: 13; align-self: end; justify-self: center;
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    width: min(400px, calc(100% - 250px)); margin: 0 0 10px; padding: 7px;
    gap: 7px; border: 1px solid #dfe5f1; border-radius: 14px;
    background: #fffffff2; box-shadow: 0 10px 28px #24365c18;
    backdrop-filter: blur(10px);
  }
  .hero.workflow-active.editor-open .quick-tools { gap: 5px; }
  .hero.workflow-active.editor-open .quick-tools button {
    min-height: 48px; padding: 4px 2px; border-radius: 10px; font-size: 9px;
  }
  .hero.workflow-active.editor-open .quick-tools button img { width: 23px; height: 23px; }
  .hero.workflow-active.editor-open .layers-button {
    align-self: stretch; min-width: 96px; min-height: 48px; margin: 0;
    padding: 7px 11px; border-radius: 10px; font-size: 11px;
  }
  .hero.workflow-active.editor-open .editor-action-message { grid-column: 1 / -1; }
  .hero.workflow-active.editor-open .workspace-action {
    grid-area: action; align-self: stretch; justify-self: center;
    width: min(620px, 100%); min-height: 0;
  }
  .hero.workflow-active.editor-open .continue-button {
    height: 100%; min-height: 48px; padding: 9px 18px;
  }
  .hero.workflow-active.editor-open .trust-row { display: none; }
  .hero.workflow-active.editor-open .tool-panel-backdrop { display: none !important; }
  .hero.workflow-active.editor-open .tool-panel-shell {
    position: relative; z-index: 14; grid-area: panel; inset: auto;
    display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%;
    height: 100%; max-height: none; overflow: hidden; border-radius: 16px;
    opacity: 1; transform: none; transition: none;
  }
  .hero.workflow-active.editor-open .tool-panel-shell[hidden] { display: none; }
  .hero.workflow-active.editor-open .tool-panel-shell > header { padding: 10px 12px; }
  .hero.workflow-active.editor-open .tool-panel {
    min-height: 0; max-height: none; padding: 12px; overflow-y: auto;
    overscroll-behavior: contain;
  }
  .hero.workflow-active.editor-open .artwork-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  }
  .hero.workflow-active.editor-open.preview-mode .editor-column { display: none !important; }
  .hero.workflow-active.editor-open.preview-mode .preview-panel {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: 44px minmax(0, 1fr);
    grid-template-areas: "toolbar" "stage";
  }
}

@media (min-width: 981px) and (max-width: 1200px) {
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) .design-editor {
    grid-template-columns: minmax(0, 1fr);
    width: min(320px, calc(100% - 250px));
  }
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) .layers-button {
    justify-self: center;
    width: 132px;
    min-height: 34px;
    padding: 5px 10px;
  }
}

/* Refined desktop workspace ------------------------------------------------ */
@media (min-width: 981px) {
  .hero.workflow-active.editor-open .preview-panel {
    grid-template-columns: 140px minmax(0, 1fr) 0;
    grid-template-rows: 52px minmax(0, 1fr) 50px;
    grid-template-areas:
      "toolbar toolbar toolbar"
      "dock stage stage"
      ". action action";
  }

  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-columns: 140px minmax(390px, 1fr) minmax(330px, 380px);
    grid-template-areas:
      "toolbar toolbar toolbar"
      "dock stage panel"
      ". action .";
  }

  .hero.workflow-active.editor-open .canvas-toolbar {
    min-height: 52px;
    padding-right: 0;
    padding-left: 152px;
    transition: padding-right .2s ease;
  }

  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) .canvas-toolbar {
    padding-right: 392px;
  }

  .hero.workflow-active.editor-open .change-design-button,
  .hero.workflow-active.editor-open .preview-mode-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 11px;
    font-size: 13px;
  }

  .hero.workflow-active.editor-open .primary-tool-dock {
    width: 140px;
    max-height: 100%;
    padding: 8px;
    gap: 8px;
    border-radius: 16px;
    box-shadow: 0 14px 34px #26345418;
  }

  .hero.workflow-active.editor-open .primary-tool-dock > button {
    padding: 9px 6px;
    gap: 7px;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.2;
  }

  .hero.workflow-active.editor-open .primary-tool-dock > button img {
    width: clamp(40px, 6vh, 50px);
    height: clamp(40px, 6vh, 50px);
  }

  .hero.workflow-active.editor-open .tool-panel-shell {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    opacity: 0;
    transform: translateX(28px) scale(.985);
    transform-origin: right center;
    box-shadow: 0 22px 52px #18223a2b, 0 0 0 1px #6d3df50f;
    transition: transform .24s cubic-bezier(.22, .8, .24, 1), opacity .2s ease, box-shadow .24s ease;
  }

  .hero.workflow-active.editor-open .tool-panel-shell.open {
    opacity: 1;
    transform: translateX(0) scale(1);
    box-shadow: 0 24px 60px #18223a33, 0 0 0 1px #6d3df518;
  }

  .hero.workflow-active.editor-open .tool-panel {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .hero.workflow-active.editor-open .tool-panel .workspace-product-options {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hero.workflow-active.editor-open .workspace-option-group {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .hero.workflow-active.editor-open .workspace-size-options {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    gap: 7px;
  }

  .hero.workflow-active.editor-open .workspace-size-options button {
    flex: 0 0 auto;
    min-width: 44px;
    height: 34px;
    padding: 0 10px;
    font-size: 10px;
  }

  .hero.workflow-active.editor-open .workspace-color-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, 24px);
    width: 100%;
    min-width: 0;
    gap: 6px;
    overflow: hidden;
  }

  .hero.workflow-active.editor-open .workspace-color-options button {
    width: 24px;
    height: 24px;
    padding: 2px;
  }
}

@media (min-width: 981px) and (max-width: 1200px) {
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-columns: 132px minmax(360px, 1fr) minmax(310px, 340px);
  }
  .hero.workflow-active.editor-open .primary-tool-dock { width: 132px; }
  .hero.workflow-active.editor-open .canvas-toolbar { padding-left: 144px; }
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) .canvas-toolbar { padding-right: 352px; }
}

/* Consistent Title Case across the public interface. */
button,
h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.panel-summary > strong,
.artwork-history-heading > strong,
.back-empty-actions > strong,
.results-heading {
  text-transform: capitalize;
}

/* Preview is a clean, enlarged product view. Editing controls disappear;
   only the exit button, canvas zoom, and front/back switch remain available. */
.hero.workflow-active.editor-open.preview-mode .preview-panel {
  position: relative;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  grid-template-areas: "stage" !important;
}
.hero.workflow-active.editor-open.preview-mode .editor-column,
.hero.workflow-active.editor-open.preview-mode .primary-tool-dock,
.hero.workflow-active.editor-open.preview-mode .design-editor,
.hero.workflow-active.editor-open.preview-mode .workspace-action,
.hero.workflow-active.editor-open.preview-mode .trust-row {
  display: none !important;
}
.hero.workflow-active.editor-open.preview-mode .canvas-toolbar {
  position: absolute;
  z-index: 20;
  top: 12px;
  right: 14px;
  display: block;
  width: auto;
  min-height: 0;
  padding: 0;
}
.hero.workflow-active.editor-open.preview-mode .change-design-button,
.hero.workflow-active.editor-open.preview-mode .canvas-price {
  display: none !important;
}
.hero.workflow-active.editor-open.preview-mode .preview-mode-button {
  display: inline-flex !important;
  min-height: 38px;
  padding: 9px 13px;
  border-color: #c9cfe0;
  color: #303b52;
  background: #fffffff2;
  box-shadow: 0 6px 18px #202a4620;
  backdrop-filter: blur(8px);
}
.hero.workflow-active.editor-open.preview-mode .shirt-stage {
  grid-area: stage;
  width: 100%;
  height: 100%;
  min-height: 0;
}

@media (max-width: 620px) {
  .hero.workflow-active.editor-open.preview-mode .preview-panel { padding: 6px; }
  .hero.workflow-active.editor-open.preview-mode .shirt-stage {
    width: 100%;
    height: min(112vw, calc(100dvh - 125px), 560px);
    min-height: min(112vw, calc(100dvh - 125px), 560px);
    max-height: 560px;
    border-radius: 12px;
  }
  .hero.workflow-active.editor-open.preview-mode .shirt-canvas-viewport {
    width: min(112vw, calc(100dvh - 125px), 560px) !important;
    max-width: none;
    max-height: none;
    transform: translateX(-40px);
  }
}

@media (min-width: 621px) {
  .hero.workflow-active.editor-open.preview-mode .shirt-canvas-viewport {
    width: min(calc(100dvh - 135px), 820px, 92vw) !important;
    max-width: none;
  }
}

/* Keep the mobile canvas and its two control rows together. On genuinely
   short screens the center workspace scrolls while the controls pin to its
   lower edge; taller phones do not get an artificial gap above the controls. */
@media (max-width: 620px) {
  .hero.workflow-active.editor-open:not(.preview-mode) .preview-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px 372px auto !important;
    grid-template-areas:
      "toolbar"
      "stage"
      "editor" !important;
    align-content: start;
  }

  .hero.workflow-active.editor-open:not(.preview-mode) .editor-column {
    position: relative;
    bottom: auto;
  }
}

@media (max-width: 620px) and (max-height: 680px) {
  .hero.workflow-active.editor-open:not(.preview-mode):not(.text-fx-mode) .editor-column {
    position: sticky;
    bottom: 0;
  }
}

/* Mobile editor header menu and in-flow checkout action bar. */
.editor-menu,
.workspace-action-price,
.continue-mobile-label { display: none; }

@media (max-width: 620px) {
  .hero.workflow-active.editor-open .workspace-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .hero.workflow-active.editor-open .editor-menu {
    position: relative;
    z-index: 52;
    display: block;
  }
  .editor-menu-button {
    display: grid;
    place-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ded3f4;
    border-radius: 11px;
    color: #7438fe;
    background: #f8f4ff;
    box-shadow: 0 3px 10px #3a285314;
  }
  .editor-menu-button span {
    display: block;
    width: 21px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }
  .editor-menu-button[aria-expanded="true"] { border-color: #7438fe; background: #eee6ff; }
  .editor-menu-popover {
    position: absolute;
    z-index: 60;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    width: min(245px, calc(100vw - 18px));
    padding: 6px;
    border: 1px solid #e5deee;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 44px #24213c2b;
  }
  .editor-menu-popover[hidden] { display: none; }
  .editor-menu-popover button,
  .editor-menu-popover a {
    display: grid;
    gap: 2px;
    padding: 10px 11px;
    border: 0;
    border-radius: 9px;
    color: #24213c;
    background: transparent;
    text-align: left;
    text-decoration: none;
  }
  .editor-menu-popover button:hover,
  .editor-menu-popover button:focus-visible,
  .editor-menu-popover a:hover,
  .editor-menu-popover a:focus-visible { background: #f5f0fc; }
  .editor-menu-popover strong { font-size: 12px; }
  .editor-menu-popover small { color: #697287; font-size: 9px; }

  .hero.workflow-active.editor-open:not(.preview-mode) .canvas-toolbar .canvas-price { display: none; }
  .hero.workflow-active.editor-open:not(.preview-mode) .canvas-toolbar {
    grid-template-columns: 1fr auto 1fr;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action {
    position: relative;
    z-index: 18;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
    border-top: 0;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    border-top: 1px solid #e5deee;
    background: #fff;
    box-shadow: 0 -8px 20px #24213c0d;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action[hidden] { display: none; }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action-price {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: 1px solid #ded3f4;
    border-radius: 12px;
    color: #24213c;
    background: #f8f4ff;
    font: 900 15px "Space Grotesk";
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action .continue-button {
    position: static;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 7px 18px #663cff24;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action .continue-desktop-label { display: none; }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action .continue-mobile-label {
    display: inline;
    font-size: 15px;
    font-weight: 900;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .workspace-action .continue-arrow {
    font-size: 18px;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .editor-column:has(.tool-panel-shell.open) .workspace-action {
    display: none;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage {
    height: clamp(220px, calc(100dvh - 410px), 372px);
  }
}

@media (max-width: 620px) {
  .text-fx-toolbar-header > div:first-child { flex: 1 1 auto; }
  .text-fx-header-actions { flex: 0 0 auto; gap: 4px; }
  #toggle-text-fx-images,
  #exit-text-fx-mode { min-height: 34px; padding: 6px 8px; font-size: 7px; }
  .text-color-popover {
    position: fixed;
    z-index: 110;
    width: auto;
    overflow-y: auto;
  }
}

@media (max-width: 340px) {
  .text-fx-effects-slot .canvas-text-effects { grid-template-columns: minmax(0, 1fr); }
  .text-fx-effects-slot .canvas-text-effects > label,
  .text-fx-effects-slot .canvas-text-effects > label:first-of-type { grid-column: auto; grid-template-columns: 92px minmax(0, 1fr); }
  .text-color-entry { grid-template-columns: minmax(0, 1fr) repeat(3, 54px); }
  .text-color-entry .text-color-apply { grid-column: 1 / -1; width: 100% !important; }
}

@media (max-width: 390px) {
  .hero.workflow-active.editor-open .workspace-step h2 {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Compact Text FX controls and persistent mobile canvas footer. */
.canvas-utility-footer { display: none; }
.text-fx-compact-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.text-fx-compact-controls > button {
  display: grid;
  grid-template-rows: 28px auto auto;
  place-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 66px;
  padding: 6px 3px;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  color: #3e4960;
  background: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.05;
}
.text-fx-compact-controls > button.active {
  border-color: #7540f0;
  color: #6530db;
  background: #f5f1ff;
  box-shadow: 0 0 0 2px #7a39ff18;
}
.text-fx-compact-controls > button:focus-visible {
  border-color: #7540f0;
  outline: 2px solid #7a39ff2b;
  outline-offset: 1px;
}
.text-fx-compact-controls strong {
  overflow: hidden;
  max-width: 100%;
  color: #59657b;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-fx-compact-controls > button.effect-enabled strong {
  min-width: 34px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: #7040e8;
}
.fx-control-icon { display: grid; place-items: center; width: 28px; height: 28px; line-height: 1; }
.fx-control-icon img { display: block; width: 28px; height: 28px; object-fit: contain; pointer-events: none; }
.fx-curve-icon { width: 34px; height: 25px; }
.fx-curve-icon img { width: 34px; height: 25px; }
.text-fx-compact-popover { position: absolute; z-index: 4; right: 7px; bottom: 32px; left: 7px; padding: 6px; border: 1px solid #dcdff0; border-radius: 11px; background: #faf9ff; box-shadow: 0 7px 18px #25325424; }
.text-fx-choice-row { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.text-fx-choice-row::-webkit-scrollbar { display: none; }
.text-fx-choice { display: inline-flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 6px 9px; border: 1px solid #dfe4ef; border-radius: 8px; color: #4a556b; background: #fff; font-size: 8px; font-weight: 900; white-space: nowrap; }
.text-fx-choice.selected { border-color: #7540f0; color: #6530db; background: #efe9ff; }
.text-fx-choice-swatch { width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #aab2c0; }
.text-fx-adjustment-area { display: grid; align-items: center; min-height: 33px; padding: 0 4px; border: 1px solid #e4e7ef; border-radius: 7px; background: #fff; }
.text-fx-spacing-row { display: grid; grid-template-columns: minmax(88px, auto) 42px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 31px; padding: 0; color: #465168; font-size: 8px; font-weight: 900; }
.text-fx-spacing-row > span:first-child,
.text-fx-spacing-row > label { font-size: 14px; line-height: 1; }
.text-fx-spacing-row output { color: #6730df; text-align: right; }
.text-fx-spacing-row input { width: 100%; accent-color: var(--purple); }
.text-fx-range-with-icons,
.text-fx-outline-adjustments,
.text-fx-shadow-adjustments,
.text-fx-curve-adjustments { display: flex; align-items: center; gap: 6px; min-width: 0; }
.text-fx-curve-adjustments .text-fx-range-with-icons { flex: 1 1 auto; }
.text-fx-range-with-icons small { flex: none; color: #7440ed; font-size: 15px; font-weight: 900; line-height: 1; }
.text-fx-range-with-icons input,
.text-fx-outline-adjustments input,
.text-fx-shadow-adjustments > input { flex: 1 1 auto; min-width: 0; }
.text-fx-range-with-icons:has(input:disabled) { cursor: not-allowed; filter: grayscale(1); opacity: .42; }
.text-fx-range-with-icons input:disabled { pointer-events: none; }
#text-fx-curve-toggle { flex: 0 0 42px; width: 42px; height: 29px; padding: 0; border: 1px solid #d8deea; border-radius: 8px; color: #737d8f; background: #f1f3f7; font-size: 10px; font-weight: 900; }
#text-fx-curve-toggle[aria-pressed="true"] { border-color: #c9b8ff; color: #6530db; background: #f2edff; box-shadow: 0 0 0 2px #7540f414; }
#text-fx-outline-color-button { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #ccd3df; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #2631491f; }
#text-fx-outline-color-button > span { width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; background: var(--fx-outline-color, #000); box-shadow: 0 0 0 1px #9da6b6; }
.text-fx-effect-color-picker { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid #ccd3df; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #2631491f; }
.text-fx-effect-color-picker .text-color-trigger > span { width: 20px; height: 20px; }
.hero.text-fx-mode .side-preview-toggle { visibility: visible; }
.hero.text-fx-mode .text-fx-effects-slot,
.hero.text-fx-mode .text-fx-layers-slot { display: none; }

@media (max-width: 620px) {
  .hero.workflow-active.editor-open:not(.preview-mode) .preview-panel,
  .hero.workflow-active.editor-open.text-fx-mode .preview-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 34px auto auto !important;
    grid-template-areas: "toolbar" "stage" "editor" !important;
    align-content: start;
    overflow: hidden;
  }
  .hero.workflow-active.editor-open.text-fx-mode .preview-panel {
    grid-template-rows: auto auto !important;
    grid-template-areas: "stage" "editor" !important;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage,
  .hero.workflow-active.editor-open.text-fx-mode .shirt-stage {
    height: clamp(190px, calc(100dvh - 330px), 372px);
    min-height: 190px;
    overflow-x: hidden;
    overflow-y: auto;
    place-items: start center;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dfe4ef;
    border-radius: 11px 11px 0 0;
  }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage::after { display: none; }
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-canvas-viewport { flex: none; }
  .hero.workflow-active.editor-open:not(.preview-mode) .editor-column,
  .hero.workflow-active.editor-open.text-fx-mode .editor-column {
    position: relative;
    z-index: 17;
    bottom: auto;
    display: grid;
    gap: 5px;
    width: 100%;
    margin-top: -6px;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    background: #f3f5fa;
    box-shadow: none;
  }
  .canvas-utility-footer {
    position: relative;
    z-index: 18;
    display: grid;
    grid-template-columns: 76px minmax(105px, 1fr) 100px;
    grid-template-rows: 42px;
    align-items: center;
    column-gap: 7px;
    row-gap: 0;
    min-height: 76px;
    padding: 7px 12px;
    border: 1px solid #dfe4ef;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #fff;
    box-shadow: 0 8px 20px #25325414;
    overflow: visible;
  }
  .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) {
    grid-template-rows: 32px 42px;
    row-gap: 5px;
    min-height: 93px;
  }
  .canvas-utility-footer .canvas-zoom-controls {
    position: static !important;
    grid-column: 1;
    grid-row: 1;
    width: 72px;
    height: 44px;
    justify-self: start;
  }
  .canvas-utility-footer .text-fx-mode-button {
    position: static;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    min-height: 30px;
    margin: 0;
    padding: 5px 10px;
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
    transform: none;
  }
  .canvas-utility-footer .layers-button {
    position: static !important;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-width: 105px;
    min-height: 42px;
    margin: 0 !important;
    padding: 6px 9px;
    justify-self: center;
    transform: none !important;
  }
  .canvas-utility-footer .side-preview-toggle {
    position: relative !important;
    inset: auto !important;
    z-index: 3;
    grid-column: 3;
    grid-row: 1;
    width: 100px !important;
    height: 78px !important;
    justify-self: end;
    transform: none !important;
    overflow: visible;
  }
  .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) .canvas-zoom-controls,
  .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) .side-preview-toggle {
    grid-row: 1 / 3;
  }
  .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) .layers-button {
    grid-row: 2;
    align-self: start;
  }
  .hero.workflow-active.editor-open:not(.preview-mode):not(.text-fx-mode) .design-editor,
  .hero.workflow-active.editor-open:not(.preview-mode):not(.text-fx-mode) .primary-tool-dock {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f3f5fa;
    box-shadow: none;
  }
  .canvas-utility-footer .side-preview-toggle .side-preview-shirt { top: -36px; width: 82px; height: 74px; }
  .canvas-utility-footer .side-preview-toggle .side-preview-rotation { right: 0; bottom: -4px; width: 88px; height: 88px; }
  .canvas-utility-footer .side-preview-toggle .side-preview-label {
    top: 47px;
    left: 50px;
    min-width: 62px;
    padding: 3px 2px;
    border-color: #dce2edcc;
    font-size: 8px;
    box-shadow: 0 2px 7px #27345816;
  }
  .text-fx-toolbar { gap: 5px; padding: 7px; border-radius: 12px; }
  .text-fx-toolbar-header { min-height: 34px; align-items: center; }
  .text-fx-toolbar-header strong { max-width: 150px; font-size: 11px; }
  #exit-text-fx-mode { min-height: 34px; padding: 6px 9px; font-size: 8px; }
  .text-fx-basic-slot .canvas-text-editor { flex-wrap: nowrap; min-height: 39px; padding: 3px; overflow-x: auto; justify-content: flex-start; }
  .text-fx-basic-slot .canvas-text-editor button,
  .text-fx-basic-slot .canvas-text-editor select,
  .text-fx-basic-slot .canvas-text-color { flex: 0 0 auto; height: 31px; }
}

@media (max-width: 620px) and (max-height: 680px) {
  .hero.workflow-active.editor-open:not(.preview-mode) .shirt-stage,
  .hero.workflow-active.editor-open.text-fx-mode .shirt-stage { height: calc(100dvh - 330px); }
  .hero.workflow-active.editor-open:not(.preview-mode) .editor-column,
  .hero.workflow-active.editor-open.text-fx-mode .editor-column { position: relative; bottom: auto; }
}

@media (max-width: 620px) {
  .hero.workflow-active.editor-open:not(.preview-mode):not(.text-fx-mode) .shirt-stage {
    height: clamp(220px, calc(100dvh - 410px), 372px);
  }
}

/* Compact creator-sheet headers and prompt actions. */
.tool-panel-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.tool-panel-heading img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  object-fit: contain;
}
.tool-panel-shell > header .tool-panel-heading h3 {
  min-width: 0;
  margin: 0;
  line-height: 1.1;
}
.panel-summary-redundant[hidden],
.editor-text-effects-toggle[hidden],
.editor-text-effects[hidden] { display: none !important; }

.ai-prompt-composer textarea {
  min-height: 92px;
  padding-bottom: 10px;
}
.ai-prompt-actions {
  display: grid;
  grid-template-columns: minmax(112px, .85fr) minmax(0, 1.65fr);
  gap: 8px;
  margin-top: 8px;
}
.ai-prompt-actions .ai-prompt-reference-controls {
  position: relative;
  inset: auto;
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 42px;
  align-items: center;
  pointer-events: auto;
}
.ai-prompt-actions .ai-prompt-reference-controls:not(.has-reference) {
  padding: 0;
}
.ai-prompt-actions .ai-prompt-reference-controls.has-reference {
  min-width: 0;
  min-height: 42px;
  padding: 3px 19px 3px 3px;
  overflow: visible;
}
.ai-prompt-actions .reference-image-button {
  width: 100%;
  max-width: none;
  min-height: 42px;
  padding: 8px 9px;
  overflow: hidden;
  border: 1px solid #d8dfee;
  border-radius: 11px;
  color: #465168;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-prompt-actions .reference-image-button.reference-thumbnail-button {
  width: 36px;
  min-width: 36px;
  height: 34px;
  min-height: 34px;
  padding: 1px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.ai-prompt-actions .reference-image-button.reference-thumbnail-button img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}
.ai-prompt-actions .panel-primary-button {
  min-height: 42px;
  margin-top: 0;
}
.ai-prompt-composer .ai-reference-help {
  right: 8px;
  bottom: 8px;
  left: 8px;
  width: auto;
}

@media (max-width: 620px) {
  .tool-panel-shell > header {
    min-height: 58px;
    padding: 16px 14px 8px;
  }
  .tool-panel-heading { gap: 9px; }
  .tool-panel-heading img { width: 28px; height: 28px; flex-basis: 28px; }
  .tool-panel-shell > header .tool-panel-heading h3 { font-size: 18px; }
  .tool-panel-shell > header > button { width: 34px; height: 34px; }
  .tool-panel { padding-top: 10px; }
  .ai-prompt-composer textarea { min-height: 84px; }
}

@media (max-width: 350px) {
  .ai-prompt-actions { grid-template-columns: 104px minmax(0, 1fr); }
  .ai-prompt-actions .reference-image-button { padding-inline: 6px; font-size: 9px; }
  .ai-prompt-actions .panel-primary-button { padding-inline: 7px; font-size: 10px; }
}

/* Text Effects is a fixed workspace on phones: the complete control panel
   stays visible and only the shirt canvas scrolls when vertical room is tight. */
@media (max-width: 620px) {
  .hero.workflow-active.editor-open.text-fx-mode .preview-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    grid-template-areas: "stage" "editor" !important;
    align-content: stretch;
    height: 100%;
    min-height: 0;
    padding: 6px 7px 8px;
    overflow: hidden;
  }

  .hero.workflow-active.editor-open.text-fx-mode .shirt-stage {
    grid-area: stage;
    align-self: stretch;
    align-content: start;
    place-items: start center;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scroll-behavior: smooth;
  }

  .hero.workflow-active.editor-open.text-fx-mode .shirt-canvas-viewport {
    flex: 0 0 auto;
    align-self: start;
    width: min(300px, 100%) !important;
    max-width: none;
    max-height: none;
    margin: 0 auto;
  }

  .hero.workflow-active.editor-open.text-fx-mode .editor-column {
    position: relative;
    z-index: 19;
    grid-area: editor;
    bottom: auto;
    display: grid;
    grid-template-rows: auto auto;
    gap: 5px;
    width: 100%;
    min-height: 0;
    margin-top: 0;
    overflow: visible;
    background: #f3f5fa;
    box-shadow: 0 -10px 24px #2532540d;
  }

  .hero.workflow-active.editor-open.text-fx-mode .text-fx-toolbar {
    max-height: none;
    overflow: visible;
  }

  .text-fx-basic-slot .canvas-text-editor {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 2px;
    padding: 3px;
    overflow: visible;
  }

  .text-fx-basic-slot .canvas-text-editor > select,
  .text-fx-basic-slot .canvas-text-editor > button,
  .text-fx-basic-slot .canvas-text-editor > .canvas-text-color,
  .text-fx-basic-slot .canvas-text-editor > .text-toolbar-actions {
    flex-shrink: 0;
    height: 31px;
  }

  .text-fx-basic-slot .canvas-text-editor > #canvas-text-font {
    flex: 1 1 72px;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .text-fx-basic-slot .canvas-text-editor > #canvas-text-size {
    flex-basis: 42px;
    width: 42px;
    min-width: 42px;
    padding-right: 14px;
  }

  .text-fx-basic-slot .canvas-text-editor > button,
  .text-fx-basic-slot .canvas-text-editor > .canvas-text-color,
  .text-fx-basic-slot .canvas-text-editor > .text-toolbar-actions > button {
    width: 30px;
    min-width: 30px;
  }

  .text-fx-basic-slot .canvas-text-editor > .text-toolbar-actions {
    gap: 2px;
    margin-left: 0;
  }

  #exit-text-fx-mode:focus:not(:focus-visible) { outline: 0; }
}

/* Homepage generation should use the full mobile workspace. The progress
   card must not inherit the compact result-preview sizing or scroll itself
   into an off-center horizontal position. */
@media (max-width: 620px) {
  .hero.workflow-active.generation-active:not(.editor-open) .maker-shell {
    min-height: calc(100dvh - 79px);
  }

  .hero.workflow-active.generation-active:not(.editor-open) .preview-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(390px, 1fr) !important;
    grid-template-areas: "stage" !important;
    align-content: stretch;
    min-height: 390px;
    padding: 8px;
    overflow: hidden;
  }

  .hero.workflow-active.generation-active:not(.editor-open) .shirt-stage {
    position: relative;
    grid-area: stage;
    place-items: center;
    width: 100% !important;
    height: 100% !important;
    min-height: 390px !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 12px;
  }

  .hero.workflow-active.generation-active:not(.editor-open) .shirt-canvas-viewport {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(86vw, 390px) !important;
    max-width: none;
    opacity: .28;
    transform: translate(-50%, -50%);
  }

  .hero.workflow-active.generation-active:not(.editor-open) .generation-progress {
    position: relative;
    inset: auto;
    z-index: 9;
    align-self: center;
    justify-self: center;
    width: min(calc(100% - 28px), 340px);
    margin: 0;
    padding: 16px 20px 18px;
    transform: none;
  }

  .hero.workflow-active.generation-active:not(.editor-open) .generation-progress .shirt-factory-animation {
    width: min(100%, 260px);
  }

  .hero.workflow-active.generation-active:not(.editor-open) .generation-progress p {
    font-size: 18px;
  }
}

@media (max-width: 620px) and (max-height: 620px) {
  .hero.workflow-active.generation-active:not(.editor-open) .maker-shell {
    min-height: calc(100dvh - 58px);
  }
  .hero.workflow-active.generation-active:not(.editor-open) .preview-panel,
  .hero.workflow-active.generation-active:not(.editor-open) .shirt-stage {
    min-height: 320px !important;
  }
  .hero.workflow-active.generation-active:not(.editor-open) .generation-progress {
    width: min(calc(100% - 24px), 310px);
    padding: 11px 17px 14px;
  }
  .hero.workflow-active.generation-active:not(.editor-open) .generation-progress .shirt-factory-animation {
    width: min(100%, 210px);
    max-height: 130px;
  }
}

/* Labeled curve directions are easier to understand than symbols alone. */
.text-fx-curve-row {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "curve-label"
    "curve-controls";
  row-gap: 2px;
  padding: 3px 2px;
}
.text-fx-curve-row > label {
  grid-area: curve-label;
  align-self: center;
}
.text-fx-curve-track {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}
.text-fx-curve-track::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 12px;
  border-radius: 2px;
  background: #7d62c2;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.text-fx-curve-track > output {
  position: absolute;
  z-index: 2;
  top: -21px;
  left: 50%;
  min-width: 52px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  background: #7040e8;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  transform: translateX(-50%);
}
.text-fx-curve-track > input {
  --curve-fill-start: 50%;
  --curve-fill-end: 50%;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 20px;
  min-width: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}
.text-fx-curve-track > input::-webkit-slider-runnable-track {
  height: 6px;
  border: 1px solid #d9dde6;
  border-radius: 999px;
  background: linear-gradient(to right,
    #e4e7ed 0 var(--curve-fill-start),
    #7040e8 var(--curve-fill-start) var(--curve-fill-end),
    #e4e7ed var(--curve-fill-end) 100%);
}
.text-fx-curve-track > input::-moz-range-track {
  height: 6px;
  border: 1px solid #d9dde6;
  border-radius: 999px;
  background: linear-gradient(to right,
    #e4e7ed 0 var(--curve-fill-start),
    #7040e8 var(--curve-fill-start) var(--curve-fill-end),
    #e4e7ed var(--curve-fill-end) 100%);
}
.text-fx-curve-track > input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 2px solid #fff;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: #7040e8;
  box-shadow: 0 0 0 1px #7040e8, 0 2px 5px #34205d38;
}
.text-fx-curve-track > input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #7040e8;
  box-shadow: 0 0 0 1px #7040e8, 0 2px 5px #34205d38;
}
.text-fx-curve-track > input:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
  border-radius: 999px;
}
.text-fx-curve-track > input:disabled::-webkit-slider-runnable-track,
.text-fx-curve-track > input:disabled::-moz-range-track {
  border-color: #d9dde4;
  background: #e4e7ed;
}
.text-fx-curve-track > input:disabled::-webkit-slider-thumb,
.text-fx-curve-track > input:disabled::-moz-range-thumb {
  background: #aeb4c0;
  box-shadow: 0 0 0 1px #aeb4c0;
}
.text-fx-curve-row:has(#text-fx-curve:disabled) .text-fx-curve-track > output {
  color: #6f7889;
  background: #e8eaf0;
}
.text-fx-curve-row:has(#text-fx-curve:disabled) .text-fx-curve-track::after {
  background: #aeb4c0;
}
.text-fx-curve-row > .text-fx-curve-adjustments {
  grid-area: curve-controls;
}
.text-fx-curve-endpoint {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  gap: 0;
  width: 34px;
  color: #6530db;
  line-height: 1;
}
.text-fx-curve-endpoint > span {
  display: block;
  height: 14px;
  font-size: 18px;
  font-weight: 900;
  line-height: .7;
}
.text-fx-curve-endpoint > em {
  display: block;
  color: #566176;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 360px) {
  .text-fx-curve-endpoint { flex-basis: 30px; width: 30px; }
  .text-fx-range-with-icons,
  .text-fx-curve-adjustments { gap: 3px; }
}

/* Desktop editor application shell. The document stays fixed while the
   canvas and tool panels provide their own scrolling regions. */
@media (min-width: 621px) {
  html:has(.hero.workflow-active.editor-open) { overflow: hidden; }
  body:has(.hero.workflow-active.editor-open) {
    height: 100dvh;
    overflow: hidden;
  }
  body:has(.hero.workflow-active.editor-open) > .site-header {
    display: none;
  }
  body:has(.hero.workflow-active.editor-open) > footer { display: none; }

  .hero.workflow-active.editor-open {
    height: 100dvh;
    min-height: 0;
    padding: 0 10px;
    overflow: hidden;
  }
  .hero.workflow-active.editor-open .maker-shell {
    grid-template-rows: 54px minmax(0, 1fr);
    width: 100%;
    max-width: 980px;
    height: 100%;
    min-height: 0;
    border-radius: 15px;
  }
  .hero.workflow-active.editor-open .workspace-header {
    z-index: 30;
    grid-template-columns: auto minmax(220px, 1fr) auto;
    min-height: 54px;
    padding: 5px 14px;
    gap: 12px;
  }
  .hero.workflow-active.editor-open .mobile-workspace-brand {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
  }
  .hero.workflow-active.editor-open .mobile-workspace-brand .brand-logo-compact {
    width: 126px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
  }
  .hero.workflow-active.editor-open .workspace-step {
    min-width: 0;
    justify-self: center;
    justify-content: center;
  }
  .hero.workflow-active.editor-open .workspace-step p { display: none; }
  .hero.workflow-active.editor-open .workspace-header h2 {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hero.workflow-active.editor-open .workspace-prompt { display: none; }
  .hero.workflow-active.editor-open .start-over-button { display: none; }
  .hero.workflow-active.editor-open .editor-menu {
    position: relative;
    z-index: 52;
    display: block;
  }
  .hero.workflow-active.editor-open .editor-menu-button {
    display: grid;
    place-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #ded3f4;
    border-radius: 10px;
    color: #7438fe;
    background: #f8f4ff;
    box-shadow: 0 3px 10px #3a285314;
  }
  .hero.workflow-active.editor-open .editor-menu-button span {
    display: block;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }
  .hero.workflow-active.editor-open .editor-menu-button[aria-expanded="true"] {
    border-color: #7438fe;
    background: #eee6ff;
  }
  .hero.workflow-active.editor-open .editor-menu-popover {
    position: absolute;
    z-index: 60;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    width: 245px;
    padding: 6px;
    border: 1px solid #e5deee;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 44px #24213c2b;
  }
  .hero.workflow-active.editor-open .editor-menu-popover[hidden] { display: none; }
  .hero.workflow-active.editor-open .editor-menu-popover button,
  .hero.workflow-active.editor-open .editor-menu-popover a {
    display: grid;
    gap: 2px;
    padding: 10px 11px;
    border: 0;
    border-radius: 9px;
    color: #24213c;
    background: transparent;
    text-align: left;
    text-decoration: none;
  }
  .hero.workflow-active.editor-open .editor-menu-popover button:hover,
  .hero.workflow-active.editor-open .editor-menu-popover button:focus-visible,
  .hero.workflow-active.editor-open .editor-menu-popover a:hover,
  .hero.workflow-active.editor-open .editor-menu-popover a:focus-visible { background: #f5f0fc; }
  .hero.workflow-active.editor-open .editor-menu-popover strong { font-size: 12px; }
  .hero.workflow-active.editor-open .editor-menu-popover small { color: #697287; font-size: 9px; }

  .hero.workflow-active.editor-open .preview-panel,
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 42px auto auto auto auto 52px;
    grid-template-areas:
      "toolbar"
      "stage"
      "utility"
      "controls"
      "dock"
      "action";
    row-gap: 6px;
    align-content: start;
    height: 100%;
    min-height: 0;
    padding: 7px 9px 8px;
    overflow: hidden;
  }
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero.workflow-active.editor-open .canvas-toolbar,
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) .canvas-toolbar {
    grid-area: toolbar;
    grid-template-columns: 1fr auto 1fr;
    justify-self: center;
    width: min(100%, clamp(330px, calc(100dvh - 425px), 620px));
    min-height: 42px;
    padding: 0;
  }
  .hero.workflow-active.editor-open .change-design-button,
  .hero.workflow-active.editor-open .preview-mode-button {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 11px;
  }
  .hero.workflow-active.editor-open .canvas-toolbar > .canvas-price { display: none !important; }
  .hero.workflow-active.editor-open .canvas-toolbar > .remove-back-button {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 9px;
  }

  .hero.workflow-active.editor-open .shirt-stage {
    grid-area: stage;
    place-items: start center;
    width: 100%;
    height: clamp(330px, calc(100dvh - 425px), 620px);
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #dfe4ef;
    border-radius: 14px 14px 0 0;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .hero.workflow-active.editor-open .shirt-stage::-webkit-scrollbar { display: none; }
  .hero.workflow-active.editor-open .shirt-stage.has-scroll-overflow { overflow-y: auto; }
  .hero.workflow-active.editor-open .shirt-canvas-viewport {
    flex: none;
    width: min(100%, clamp(330px, calc(100dvh - 425px), 620px)) !important;
    max-width: 100%;
    max-height: none;
  }
  .hero.workflow-active.editor-open .editor-column { display: contents !important; }

  .hero.workflow-active.editor-open .canvas-utility-footer {
    position: relative;
    z-index: 18;
    grid-area: utility;
    display: grid;
    grid-template-columns: 106px minmax(120px, 1fr) 118px;
    grid-template-rows: 48px;
    align-items: center;
    column-gap: 9px;
    min-height: 83px;
    margin-top: -6px;
    padding: 6px 14px;
    border: 1px solid #dfe4ef;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #fff;
    box-shadow: 0 7px 18px #25325412;
    overflow: visible;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) {
    grid-template-rows: 30px 42px;
    row-gap: 3px;
    min-height: 81px;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .canvas-zoom-controls {
    position: static !important;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    width: 100px;
    height: 46px;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .text-fx-mode-button {
    position: static;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    min-height: 28px;
    margin: 0;
    padding: 5px 11px;
    font-size: 8px;
    line-height: 1;
    white-space: nowrap;
    transform: none;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .layers-button {
    position: static !important;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: auto;
    min-width: 120px;
    min-height: 44px;
    margin: 0 !important;
    padding: 7px 12px;
    transform: none !important;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .side-preview-toggle {
    position: relative !important;
    inset: auto !important;
    z-index: 3;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 112px !important;
    height: 76px !important;
    transform: none !important;
    overflow: visible;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) .canvas-zoom-controls,
  .hero.workflow-active.editor-open .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) .side-preview-toggle { grid-row: 1 / 3; }
  .hero.workflow-active.editor-open .canvas-utility-footer:has(.text-fx-mode-button:not([hidden])) .layers-button {
    grid-row: 2;
    align-self: start;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .side-preview-shirt {
    top: -34px;
    width: 84px;
    height: 74px;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .side-preview-rotation {
    right: 5px;
    bottom: -5px;
    width: 88px;
    height: 88px;
  }
  .hero.workflow-active.editor-open .canvas-utility-footer .side-preview-label {
    top: 48px;
    left: 56px;
    min-width: 68px;
    padding: 3px 4px;
    font-size: 8px;
  }

  .hero.workflow-active.editor-open .design-editor {
    grid-area: controls;
    z-index: 13;
    align-self: stretch;
    justify-self: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: min(72%, 930px);
    margin: 0;
    padding: 0;
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .hero.workflow-active.editor-open .quick-tools {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
  .hero.workflow-active.editor-open .quick-tools button {
    min-height: 46px;
    padding: 4px 2px;
    border: 1px solid #dfe4ef;
    border-radius: 10px;
    color: #354057;
    background: #f8f9fd;
    font-size: 8px;
    transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
  }
  .hero.workflow-active.editor-open .quick-tools button:hover:not(:disabled),
  .hero.workflow-active.editor-open .quick-tools button:focus-visible {
    border-color: #8b62ff;
    color: #6530db;
    background: #f2edff;
    box-shadow: 0 5px 14px #6d3df51c;
    transform: translateY(-1px);
  }
  .hero.workflow-active.editor-open .quick-tools button:focus-visible {
    outline: 2px solid #8b62ff55;
    outline-offset: 1px;
  }
  .hero.workflow-active.editor-open .quick-tools button:active:not(:disabled) {
    box-shadow: none;
    transform: translateY(0);
  }
  .hero.workflow-active.editor-open .quick-tools button:disabled {
    color: #98a1b2;
    background: #f1f3f7;
    cursor: not-allowed;
    opacity: .58;
  }
  .hero.workflow-active.editor-open .quick-tools button img { width: 23px; height: 23px; }
  .hero.workflow-active.editor-open .editor-action-message { grid-column: 1 / -1; }

  .hero.workflow-active.editor-open .primary-tool-dock {
    grid-area: dock;
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    max-height: none;
    min-height: 0;
    padding: 0;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .hero.workflow-active.editor-open .primary-tool-dock > button {
    min-height: 72px;
    padding: 7px 5px;
    gap: 4px;
    border-radius: 11px;
    font-size: 10px;
  }
  .hero.workflow-active.editor-open .primary-tool-dock > button img {
    width: 34px;
    height: 34px;
  }

  .hero.workflow-active.editor-open .text-fx-toolbar {
    grid-area: controls;
    min-height: 0;
    max-height: 190px;
    overflow-y: auto;
  }
  .hero.workflow-active.editor-open .workspace-action {
    grid-area: action;
    align-self: stretch;
    justify-self: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 5px;
    border-top: 1px solid #e4e7ef;
    background: #fff;
  }
  .hero.workflow-active.editor-open .workspace-action-price {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    width: 100%;
    border: 1px solid #ddd2f7;
    border-radius: 11px;
    background: #faf7ff;
    font-size: 14px;
    box-shadow: none;
  }
  .hero.workflow-active.editor-open .continue-button {
    height: auto;
    min-height: 42px;
    padding: 8px 15px;
    border-radius: 11px;
  }
  .hero.workflow-active.editor-open .trust-row { display: none; }

  .hero.workflow-active.editor-open .tool-panel-backdrop {
    position: fixed;
    z-index: 69;
    inset: 0;
    display: block !important;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #10162970;
    backdrop-filter: blur(2px);
  }
  .hero.workflow-active.editor-open .tool-panel-backdrop[hidden] { display: none !important; }
  .hero.workflow-active.editor-open .tool-panel-shell {
    position: fixed;
    z-index: 70;
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(940px, calc(100vw - 32px));
    height: min(72dvh, 680px);
    max-height: min(72dvh, 680px);
    border-radius: 22px 22px 0 0;
    opacity: 1;
    transform: translate(-50%, 105%);
    transition: transform .2s ease;
  }
  .hero.workflow-active.editor-open .tool-panel-shell[hidden] { display: none; }
  .hero.workflow-active.editor-open .tool-panel-shell.open { transform: translate(-50%, 0); }
  .hero.workflow-active.editor-open .tool-panel-shell > header {
    position: relative;
    padding: 15px 18px 12px;
  }
  .hero.workflow-active.editor-open .tool-panel-shell > header::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: #d5d9e3;
    transform: translateX(-50%);
  }
  .hero.workflow-active.editor-open .tool-panel {
    min-height: 0;
    max-height: none;
    padding: 15px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .hero.workflow-active.editor-open.text-fx-mode .preview-panel {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(160px, 1fr) auto auto !important;
    grid-template-areas:
      "stage"
      "utility"
      "controls" !important;
    align-content: stretch;
    row-gap: 0;
  }
  .hero.workflow-active.editor-open.text-fx-mode .shirt-stage {
    grid-area: stage;
    min-height: 0;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    scrollbar-width: none;
  }
  .hero.workflow-active.editor-open.text-fx-mode .shirt-stage::-webkit-scrollbar {
    display: none;
  }
  .hero.workflow-active.editor-open.text-fx-mode .canvas-utility-footer {
    grid-area: utility;
    margin-top: 0;
  }
  .hero.workflow-active.editor-open.text-fx-mode .text-fx-toolbar {
    grid-area: controls;
    align-self: stretch;
    width: 100%;
    min-height: max-content;
    max-height: none;
    margin-top: 6px;
    overflow: visible;
    overscroll-behavior: auto;
  }
  .hero.workflow-active.editor-open.text-fx-mode .text-fx-adjustment-area {
    overflow: visible;
  }
  .hero.workflow-active.editor-open.text-fx-mode .text-fx-curve-row {
    min-height: 58px;
    padding-bottom: 6px;
  }
  .hero.workflow-active.editor-open.text-fx-mode .text-fx-curve-row > .text-fx-curve-adjustments {
    min-height: 35px;
    padding-top: 14px;
  }
}

@media (min-width: 621px) and (max-height: 760px) {
  .hero.workflow-active.editor-open { height: 100dvh; padding: 0 8px; }
  .hero.workflow-active.editor-open .maker-shell { grid-template-rows: 46px minmax(0, 1fr); }
  .hero.workflow-active.editor-open .workspace-header { min-height: 46px; padding-block: 4px; }
  .hero.workflow-active.editor-open .mobile-workspace-brand .brand-logo-compact { width: 112px; height: 38px; }
  .hero.workflow-active.editor-open .preview-panel,
  .hero.workflow-active.editor-open .preview-panel:has(.tool-panel-shell.open) {
    grid-template-rows: 38px auto auto auto auto 48px;
    row-gap: 4px;
    padding: 5px 7px 6px;
  }
  .hero.workflow-active.editor-open .canvas-toolbar { min-height: 38px; }
  .hero.workflow-active.editor-open .canvas-utility-footer { min-height: 56px; padding-block: 4px; }
  .hero.workflow-active.editor-open .quick-tools button { min-height: 42px; }
  .hero.workflow-active.editor-open .primary-tool-dock > button { min-height: 62px; }
  .hero.workflow-active.editor-open .primary-tool-dock > button img { width: 29px; height: 29px; }
  .hero.workflow-active.editor-open .workspace-action { min-height: 48px; padding: 3px; }
  .hero.workflow-active.editor-open .continue-button { min-height: 40px; }
}
/* Permanent account library: independent of the editor's movable tool sheets. */
.account-history-dialog { width: min(880px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); padding: 22px; border: 1px solid #dce1ef; border-radius: 20px; color: #20283d; background: #fff; overflow-y: auto; }
.account-history-dialog::backdrop { background: #1e263b88; }
.account-history-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-history-header h2 { margin: 0 0 6px; font-size: 24px; }
.account-history-email, .account-history-status { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.account-history-email { margin: 0; color: #5a647b; }
.account-history-dialog button { min-height: 44px; padding: 10px 14px; border: 1px solid #dce1ef; border-radius: 12px; color: #6135dc; background: #f6f3ff; font: inherit; font-weight: 700; cursor: pointer; }
.account-history-dialog button:hover { background: #eee7ff; border-color: #8255ff; }
.account-history-dialog button:disabled { opacity: .55; cursor: wait; }
.account-history-dialog button:focus-visible, .account-history-dialog a:focus-visible { outline: 3px solid #7040ff; outline-offset: 3px; }
.account-history-dialog .account-history-close { flex: 0 0 44px; font-size: 24px; padding: 4px; }
.account-design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 18px 0; }
.account-design-grid article { display: grid; align-content: start; gap: 9px; padding: 12px; background: #f7f8fc; border: 1px solid #e0e5f1; border-radius: 16px; }
.account-design-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #eef1f8; }
.account-design-grid p { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.account-design-grid small { color: #647086; }
.account-history-dialog .account-design-delete { color: #a3374e; background: #fff; }
.account-history-dialog .account-sign-in { background: linear-gradient(110deg, #7938ff, #0865ff); color: #fff; }
.account-history-more { margin-right: 12px; }
.saved-design-help { font-size: 12px; line-height: 1.5; color: #5b647a; }
.saved-design-help a { color: #6135dc; }
.history-save-notice { position: fixed; z-index: 10000; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(650px, calc(100vw - 24px)); padding: 12px 16px; border: 1px solid #e5b977; border-radius: 12px; background: #fff6e5; box-shadow: 0 4px 20px #20284025; font-size: 13px; line-height: 1.5; }
.history-save-notice a { font-weight: 700; color: #6135dc; margin: 0 8px; }
.history-save-notice button { border: 1px solid #d8c297; border-radius: 8px; min-height: 36px; background: #fff; cursor: pointer; }
.history-save-notice[hidden] { display: none; }
@media (max-width: 480px) { .account-history-dialog { padding: 16px; } .account-design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .account-design-grid article { padding: 8px; } .account-design-grid p { font-size: 13px; } .account-design-grid button { font-size: 12px; padding: 8px; } }

/* Compact homepage creator -------------------------------------------------
   The full editor keeps its existing layout after generation. These rules
   only reshape the first-step homepage form and its idle preview area. */
.home-showcase { display: none; }

@media (min-width: 621px) {
  .hero:not(.workflow-active) { padding-top: 42px; }
  .hero:not(.workflow-active) .hero-copy { margin-bottom: 24px; }
  .hero:not(.workflow-active) .maker-shell {
    grid-template-columns: minmax(430px, 500px) minmax(500px, 1fr);
    min-height: 0;
  }
  .hero:not(.workflow-active) .controls-panel { padding: 24px 26px 22px; }
  .hero:not(.workflow-active) .product-pill { margin-bottom: 13px; padding: 7px 11px; }
  .hero:not(.workflow-active) .step-heading { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; margin-bottom: 8px; }
  .hero:not(.workflow-active) .step-heading h2 { font-size: 20px; }
  .hero:not(.workflow-active) .home-shirt-thumbnail { position: relative; display: grid; place-items: center; width: 74px; height: 74px; margin-left: auto; overflow: hidden; border: 1px solid #dfe4ef; border-radius: 14px; background: linear-gradient(145deg, #f8f9fd, #eef2f8); box-shadow: 0 8px 20px #26345712; }
  .hero:not(.workflow-active) .home-shirt-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(1.05); }
  .hero:not(.workflow-active) .home-shirt-preview-pill { position: absolute; z-index: 1; left: 50%; bottom: 5px; padding: 3px 6px; border: 1px solid #d8cff8; border-radius: 999px; color: #5e35c8; background: #ffffffed; box-shadow: 0 3px 9px #2821461a; font-size: 6.2px; font-weight: 800; line-height: 1; white-space: nowrap; transform: translateX(-50%); }
  .hero:not(.workflow-active) .prompt-label { margin-bottom: 0; }
  .hero:not(.workflow-active) textarea { min-height: 78px; max-height: 128px; padding: 12px 40px 12px 13px; }
  .hero:not(.workflow-active) .prompt-spark { top: 12px; }
  .hero:not(.workflow-active) .prompt-meta { margin: 5px 0 6px; }
  .hero:not(.workflow-active) .reference-upload { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 5px; margin-bottom: 11px; }
  .hero:not(.workflow-active) .reference-help { margin: 0; }
  .hero:not(.workflow-active) .reference-preview,
  .hero:not(.workflow-active) .reference-uses,
  .hero:not(.workflow-active) .reference-status { grid-column: 1 / -1; }
  .hero:not(.workflow-active) fieldset { margin-bottom: 11px; }
  .hero:not(.workflow-active) .style-grid { gap: 6px; margin-top: 6px; }
  .hero:not(.workflow-active) .style-option { padding: 7px 4px; }
  .hero:not(.workflow-active) .product-options { grid-template-columns: minmax(150px, 1.25fr) minmax(105px, .9fr) minmax(76px, .6fr); gap: 8px; margin-bottom: 11px; }
  .hero:not(.workflow-active) .product-options label:first-child { grid-column: auto; }
  .hero:not(.workflow-active) .product-options label { gap: 5px; }
  .hero:not(.workflow-active) select { padding-top: 9px; padding-bottom: 9px; }
  .hero:not(.workflow-active) input[type="email"] { margin: 5px 0 7px; padding-top: 9px; padding-bottom: 9px; }
  .hero:not(.workflow-active) .saved-design-help { margin: 0 0 10px; font-size: 10px; }
  .hero:not(.workflow-active) .rights-check { font-size: 10px; }
  .hero:not(.workflow-active) .primary-button { margin-top: 12px; padding: 12px 15px; }
  .hero:not(.workflow-active) .form-status { min-height: 0; margin-top: 5px; }

  .hero:not(.workflow-active) .preview-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas: "showcase" "trust";
    align-items: center;
    gap: 18px 22px;
    min-height: 0;
    padding: 30px;
    background:
      radial-gradient(circle at 79% 24%, #dedaff 0, #eef0ff 22%, transparent 43%),
      linear-gradient(145deg, #f7f8fd 0%, #eef2fa 100%);
  }
  .hero:not(.workflow-active) .home-showcase { grid-area: showcase; display: flex; flex-direction: column; min-width: 0; }
  .home-showcase-kicker { color: var(--purple); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
  .home-showcase-copy h2 { max-width: 430px; margin: 8px 0 10px; font: 700 clamp(25px, 2.4vw, 36px)/1.05 "Space Grotesk"; letter-spacing: -.035em; }
  .home-showcase-copy p { max-width: 470px; margin: 0; color: #58647a; font-size: 13px; line-height: 1.55; }
  .home-creation-steps { display: grid; gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
  .home-creation-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 10px; }
  .home-creation-steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: white; background: linear-gradient(135deg, var(--purple), var(--blue)); font-size: 10px; box-shadow: 0 6px 14px #663cff24; }
  .home-creation-steps span { display: grid; gap: 1px; }
  .home-creation-steps strong { color: #263149; font-size: 12px; }
  .home-creation-steps small { color: #6a758b; font-size: 10px; }
  .home-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
  .home-feature-grid article { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 10px; border: 1px solid #e0e4ef; border-radius: 13px; background: #ffffffc9; box-shadow: 0 7px 18px #2934520a; backdrop-filter: blur(7px); }
  .home-feature-grid img { width: 32px; height: 32px; object-fit: contain; }
  .home-feature-grid span { display: grid; gap: 2px; min-width: 0; }
  .home-feature-grid strong { color: #29334a; font-size: 10px; }
  .home-feature-grid small { color: #737e92; font-size: 8px; line-height: 1.25; }

  .hero:not(.workflow-active) .preview-panel > .shirt-stage { display: none; }
  .hero:not(.workflow-active) .trust-row { grid-area: trust; display: grid; gap: 5px; align-self: start; margin: 0; padding: 0 4px; color: #59657a; font-size: 9px; }
}

@media (min-width: 621px) and (max-width: 980px) {
  .hero:not(.workflow-active) .maker-shell { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero:not(.workflow-active) .step-heading { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; margin-bottom: 7px; }
  .hero:not(.workflow-active) .home-shirt-thumbnail { position: relative; display: grid; place-items: center; width: 62px; height: 62px; margin-left: auto; overflow: hidden; border: 1px solid #dfe4ef; border-radius: 12px; background: linear-gradient(145deg, #f8f9fd, #eef2f8); box-shadow: 0 7px 17px #26345712; }
  .hero:not(.workflow-active) .home-shirt-thumbnail img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.05); }
  .hero:not(.workflow-active) .home-shirt-preview-pill { bottom: 4px; padding-inline: 5px; font-size: 5.5px; }
  .hero:not(.workflow-active) .product-options { grid-template-columns: 1fr 1fr; }
  .hero:not(.workflow-active) .product-options label:first-child { grid-column: 1 / -1; }
  .hero:not(.workflow-active) .prompt-assist-bar { min-height: 62px; margin-top: -3px; }
  .hero:not(.workflow-active) .reference-helper { align-items: flex-start; flex-direction: column; gap: 3px; }
  .hero:not(.workflow-active) .prompt-assist-bar .reference-image-button { min-height: 38px; padding: 9px 15px; font-size: 10.5px; box-shadow: 0 5px 14px #29345212; }
  .hero:not(.workflow-active) .prompt-assist-bar .reference-image-button span { font-size: 16px; }
  .hero:not(.workflow-active) .prompt-assist-bar .reference-help { max-width: 205px; font-size: 8.5px; line-height: 1.25; }
}

/* Prompt Assist ----------------------------------------------------------- */
.prompt-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 6px; }
.prompt-heading-row .prompt-label { margin: 0; }
.prompt-heading-row .open-prompt-assist { flex: 0 0 auto; min-height: 29px; padding: 6px 10px; border: 1px solid #cfbeff; border-radius: 999px; color: #fff; background: linear-gradient(110deg, var(--purple), var(--blue)); box-shadow: 0 5px 14px #663cff24; font-size: 9px; font-weight: 800; white-space: nowrap; }
.prompt-heading-row .open-prompt-assist:hover, .prompt-heading-row .open-prompt-assist:focus-visible { color: #fff; background: linear-gradient(110deg, #6b2df3, #075ee8); outline: none; }
.prompt-assist-bar { display: flex; align-items: center; justify-content: flex-start; gap: 7px; min-height: 74px; margin: 0 0 7px; }
.prompt-assist-bar::-webkit-scrollbar { display: none; }
.reference-helper { display: flex; align-items: center; gap: 8px; min-width: 0; }
.prompt-assist-bar .reference-help { max-width: 220px; margin: 0; line-height: 1.3; }
.hero:not(.workflow-active) .reference-upload:not(:has(.reference-preview:not([hidden]))):not(:has(.reference-status:not(:empty))) { display: none; }
.prompt-assist-bar button { flex: 0 0 auto; min-height: 29px; padding: 6px 9px; border: 1px solid #dfe4ef; border-radius: 999px; color: #58647a; background: #fff; font-size: 9px; font-weight: 700; white-space: nowrap; }
.prompt-assist-bar button:hover, .prompt-assist-bar button:focus-visible { border-color: #8d68ff; color: #6633d8; background: #f7f3ff; outline: none; }
.prompt-assist-bar .reference-image-button { padding: 6px 11px; border-radius: 999px; }
.prompt-assist-bar .reference-image-button span { font-size: 13px; }

.home-color-dropdown { position: relative; display: block; margin-top: 5px; }
.home-color-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden; opacity: 0; pointer-events: none; }
.home-color-button { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #d6ddef; border-radius: 10px; color: #303b52; background: #fff; font: inherit; font-size: 11px; font-weight: 600; text-align: left; }
.home-color-button:hover, .home-color-button:focus-visible, .home-color-button[aria-expanded="true"] { border-color: #8560ff; box-shadow: 0 0 0 3px #7a39ff13; outline: none; }
.home-color-button i, .home-color-options i { display: block; width: 16px; height: 16px; border: 1px solid #aeb6c5; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #ffffff80; }
.home-color-button b { color: #738097; font-size: 12px; font-weight: 700; }
.home-color-options { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; right: 0; max-height: 230px; padding: 5px; overflow-y: auto; border: 1px solid #dce1ed; border-radius: 11px; background: #fff; box-shadow: 0 15px 35px #202a4629; }
.home-color-options[hidden] { display: none; }
.home-color-options button { display: grid; grid-template-columns: 18px minmax(0, 1fr) 16px; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 0; border-radius: 8px; color: #3b465d; background: transparent; font-size: 10px; text-align: left; }
.home-color-options button:hover, .home-color-options button:focus-visible { color: #6030d6; background: #f5f1ff; outline: none; }
.home-color-options button b { visibility: hidden; color: #6834df; }
.home-color-options button.selected b { visibility: visible; }
.prompt-assist-backdrop { position: fixed; z-index: 1000; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #1b233b5c; backdrop-filter: blur(3px); }
.prompt-assist-panel { position: absolute; z-index: 1001; top: 86px; left: 18px; right: 18px; max-height: calc(100% - 104px); padding: 18px; overflow-y: auto; border: 1px solid #dcdff0; border-radius: 18px; color: #20283d; background: #fff; box-shadow: 0 24px 70px #202a4640; }
.prompt-assist-handle { display: none; }
.prompt-assist-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.prompt-assist-panel > header small { color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.prompt-assist-panel > header h3 { margin: 3px 0 0; font: 700 21px "Space Grotesk"; }
.prompt-assist-panel > header > button { flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 1px solid #dfe4ef; border-radius: 10px; color: #5c6780; background: #f7f8fc; font-size: 20px; }
.prompt-assist-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 14px 0; padding: 4px; border-radius: 11px; background: #f2f4f9; }
.prompt-assist-tabs button { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 8px; color: #687389; background: transparent; font-size: 10px; font-weight: 800; }
.prompt-assist-tabs button.selected { color: #5e2ed2; background: #fff; box-shadow: 0 3px 10px #202a4614; }
.prompt-assist-quick > p { margin: 0 0 12px; color: #6b768b; font-size: 10px; line-height: 1.45; }
.prompt-assist-field { display: grid; gap: 6px; margin-top: 10px; }
.prompt-assist-field strong { color: #334057; font-size: 10px; }
.prompt-assist-field strong span { color: #8a93a5; font-size: 8px; font-weight: 500; }
.prompt-assist-choices { display: flex; flex-wrap: wrap; gap: 5px; }
.prompt-assist-choices button { min-height: 29px; padding: 6px 9px; border: 1px solid #dfe4ef; border-radius: 999px; color: #59657a; background: #fff; font-size: 9px; }
.prompt-assist-choices button:hover, .prompt-assist-choices button:focus-visible { border-color: #9a7aff; outline: none; }
.prompt-assist-choices button.selected { border-color: #7a39ff; color: #602dd6; background: #efe9ff; font-weight: 800; box-shadow: 0 0 0 2px #7a39ff12; }
.prompt-assist-field input { width: 100%; min-height: 37px; padding: 9px 10px; border: 1px solid #dfe4ef; border-radius: 10px; color: #20283d; background: #fbfcff; font-size: 10px; }
.prompt-assist-primary { min-height: 40px; padding: 10px 14px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(110deg, var(--purple), var(--blue)); font-size: 10px; font-weight: 800; box-shadow: 0 8px 18px #663cff22; }
.prompt-assist-primary:disabled { cursor: wait; opacity: .6; }
.prompt-assist-quick > .prompt-assist-primary { width: 100%; margin-top: 14px; }
.prompt-guide-progress { display: flex; align-items: center; gap: 10px; color: #687389; font-size: 9px; font-weight: 700; }
.prompt-guide-progress i { flex: 1; height: 5px; overflow: hidden; border-radius: 99px; background: #e9ecf4; }
.prompt-guide-progress b { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--blue)); transition: width .2s ease; }
.prompt-guide-bubble { display: grid; grid-template-columns: 26px 1fr; align-items: start; gap: 9px; margin: 15px 0 12px; }
.prompt-guide-bubble > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--purple), var(--blue)); }
.prompt-guide-bubble p { margin: 0; padding: 10px 12px; border-radius: 4px 13px 13px; color: #29344b; background: #f3efff; font-size: 12px; font-weight: 700; line-height: 1.4; }
.prompt-assist-guide > label { color: #5d687e; font-size: 9px; font-weight: 800; }
.prompt-assist-guide textarea { min-height: 82px; margin-top: 6px; padding: 11px; border-radius: 11px; font-size: 11px; }
.prompt-guide-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 11px; }
.prompt-guide-actions > button:first-child { min-height: 40px; padding: 9px 13px; border: 1px solid #dfe4ef; border-radius: 11px; color: #58647a; background: #fff; font-size: 10px; font-weight: 700; }
.prompt-guide-actions > button:disabled { opacity: .35; }
.prompt-guide-actions .prompt-assist-primary { margin-left: auto; }
.prompt-assist-result { display: grid; gap: 10px; }
.prompt-assist-result > div:first-child, .prompt-assist-result > label { display: grid; gap: 5px; }
.prompt-assist-result small { color: #7a39ff; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.prompt-assist-result p { margin: 0; padding: 10px 11px; border: 1px solid #e1e5ef; border-radius: 10px; color: #697489; background: #f8f9fc; font-size: 10px; line-height: 1.4; }
.prompt-assist-result textarea { min-height: 112px; padding: 11px; border-color: #bda8ff; border-radius: 11px; background: #fcfbff; font-size: 11px; }
.prompt-assist-result-actions { display: grid; grid-template-columns: auto auto 1fr; gap: 7px; }
.prompt-assist-result-actions button { min-height: 40px; padding: 9px 11px; border: 1px solid #dfe4ef; border-radius: 10px; color: #58647a; background: #fff; font-size: 9px; font-weight: 800; }
.prompt-assist-result-actions .prompt-assist-primary { border: 0; color: #fff; background: linear-gradient(110deg, var(--purple), var(--blue)); }
.prompt-assist-status { min-height: 14px; margin: 9px 0 0; color: #6a7489; font-size: 9px; line-height: 1.4; }

@media (max-width: 620px) {
  body.prompt-assist-open { overflow: hidden; }
  .prompt-assist-bar { margin-bottom: 5px; padding-bottom: 0; }
  .prompt-assist-panel { position: fixed; z-index: 1001; top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 82dvh; padding: 12px 16px max(16px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .prompt-assist-handle { display: block; width: 42px; height: 4px; margin: -3px auto 10px; border-radius: 99px; background: #d5d9e4; }
  .prompt-assist-panel > header h3 { font-size: 19px; }
  .prompt-assist-result-actions { grid-template-columns: 1fr 1fr; }
  .prompt-assist-result-actions .prompt-assist-primary { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .hero:not(.workflow-active) textarea { min-height: 98px; }
}
