:root {
  /* WRSTLR store look: white, near-black text, Assistant, black pill buttons */
  --ink: #121212;
  --text: #121212;
  --muted: rgba(18, 18, 18, .66);
  --line: #E6E6E6;
  --soft: #F4F4F4;
  --panel: #FFFFFF;
  --accent: #121212;
  --accent-2: #000000;
  --accent-soft: #F1F1F1;
  --err: #C62828;
  --ok: #0F8A4B;
  --r: 10px;
  --bar-h: 58px;
  --font: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}
button { font: inherit; color: inherit; cursor: pointer; letter-spacing: inherit; }

/* ---------- WRSTLR site header ---------- */
.announce {
  flex: none; text-align: center; font-size: 13px; letter-spacing: .1em;
  padding: 9px 16px; border-bottom: 1px solid var(--line); color: var(--text);
}
.site-header {
  flex: none; position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 32px; border-bottom: 1px solid var(--line); background: #fff; z-index: 40;
}
.site-logo { justify-self: center; display: block; line-height: 0; }
.site-logo img { width: 110px; height: auto; }
.header-icons { justify-self: end; display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none;
  color: var(--text); border-radius: 50%;
}
.icon-btn:hover { background: var(--soft); }
#menuBtn { justify-self: start; }
.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
  border-bottom: 1px solid var(--line); padding: 8px 0; box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
}
.site-nav.open { display: block; }
.site-nav a { display: block; padding: 13px 32px; color: var(--text); text-decoration: none; font-size: 17px; }
.site-nav a:hover, .site-nav a.on { background: var(--soft); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- builder bar ---------- */
.builder-bar {
  flex: none; display: flex; align-items: center; gap: 16px; padding: 10px 32px; min-height: var(--bar-h);
  border-bottom: 1px solid var(--line); background: #fff; z-index: 30;
}
.page-title { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: .04em; white-space: nowrap; }
.steps { display: flex; gap: 4px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step {
  display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent;
  color: var(--muted); padding: 7px 14px 7px 7px; border-radius: 40px; font-size: 15px; white-space: nowrap;
}
.step b {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 1px solid #CFCFCF; color: var(--muted);
}
.step:hover { color: var(--text); }
.step.done b { background: var(--soft); color: var(--text); border-color: var(--soft); }
.step.on { border-color: var(--text); color: var(--text); }
.step.on b { background: var(--ink); border-color: var(--ink); color: #fff; }
.top-actions { display: flex; gap: 8px; flex: none; }

.pill, .primary {
  border: 1px solid var(--ink); background: #fff; color: var(--ink); border-radius: 40px;
  padding: 10px 20px; font-size: 15px; letter-spacing: .06em; white-space: nowrap;
  box-shadow: 0 0 0 0 var(--ink); transition: box-shadow .15s;
}
.pill:hover, .primary:hover { box-shadow: 0 0 0 1px var(--ink); }
.pill.solid, .primary { background: var(--ink); color: #fff; }
.pill:disabled, .primary:disabled { opacity: .55; cursor: wait; }
.top-actions .pill { padding: 8px 16px; font-size: 14px; }

/* ---------- layout ---------- */
.builder { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 440px; }

.stage {
  position: relative; min-height: 0;
  background: radial-gradient(ellipse at 50% 40%, #FFFFFF 0, #F2F2F2 50%, #E2E2E2 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 60px 24px 44px;
}
.singlet { height: 100%; width: 100%; display: flex; gap: 2%; align-items: center; justify-content: center; }
.singlet > svg {
  height: 100%; max-height: 780px; width: auto; max-width: 100%;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .18));
}
.singlet.both > svg { max-width: 48%; }
.view-toggle {
  position: absolute; top: 16px; left: 16px; display: flex; z-index: 2;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 40px; padding: 3px;
}
.cut-toggle { left: auto; right: 16px; }
.view-toggle button { border: 0; background: none; padding: 7px 14px; border-radius: 40px; font-size: 14px; color: var(--muted); }
.view-toggle button.on { background: var(--ink); color: #fff; }
.stage-note {
  position: absolute; bottom: 12px; left: 16px; margin: 0; z-index: 2;
  font-size: 13px; color: var(--muted); background: rgba(255, 255, 255, .88); padding: 5px 12px; border-radius: 40px;
}


/* ---------- panel ---------- */
.panel { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-body { flex: 1; overflow-y: auto; padding: 26px 24px 32px; }
.panel-foot {
  border-top: 1px solid var(--line); padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff;
}
.price small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.price strong { font-size: 24px; font-weight: 700; }
.price span { display: block; font-size: 12px; color: var(--accent-2); font-weight: 600; }
.nav-btns { display: flex; gap: 8px; }
.panel .ghost { background: #fff; border: 1px solid var(--ink); border-radius: 40px; padding: 10px 16px; }
.panel .ghost:hover { box-shadow: 0 0 0 1px var(--ink); }

.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.panel h2 { font-size: 27px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.lede { color: var(--muted); margin: 0 0 20px; font-size: 14px; line-height: 1.5; }
.panel h4 { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

/* style step */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl {
  border: 1.5px solid var(--line); background: var(--soft); border-radius: var(--r);
  padding: 12px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tpl svg { height: 128px; width: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .12)); }
.tpl-name { font-size: 13px; font-weight: 700; }
.tpl:hover { border-color: #B9BFC9; }
.tpl.on { border-color: var(--accent); background: var(--accent-soft); }

/* colors step */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: #fff;
  border-radius: var(--r); padding: 10px; text-align: left; position: relative;
}
.slot.on { border-color: var(--accent); background: var(--accent-soft); }
.slot .sw { width: 30px; height: 30px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.slot b { display: block; font-size: 14px; }
.slot small { color: var(--muted); font-size: 12px; }
.swatches { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.preset { display: flex; height: 32px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; background: none; }
.preset i { flex: 1; }
.preset:hover { box-shadow: 0 0 0 2px var(--accent); }
.custom-hex {
  display: flex; align-items: center; justify-content: space-between; margin-top: 20px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px;
}
.custom-hex input { width: 46px; height: 30px; border: 0; background: none; padding: 0; cursor: pointer; }

/* shared controls */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tab.on { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row > span { font-size: 14px; font-weight: 600; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: #CBD0D8; border-radius: 999px; transition: background .2s; }
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: block; margin-top: 12px; }
.field > span { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font: inherit; font-size: 15px; background: #fff; color: var(--text);
}
.field textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.marks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mark {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 4px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
}
.mark svg { width: 28px; height: 28px; }
.mark.on { border-color: var(--accent); background: var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 999px; padding: 4px 11px 4px 4px; font-size: 12px; font-weight: 600;
}
.chip i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.chip i.none { background: linear-gradient(135deg, #fff 45%, #E04848 45%, #E04848 55%, #fff 55%); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); }
.fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.font {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 4px 7px;
  display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.font b { font-size: 21px; font-weight: normal; line-height: 1.15; white-space: nowrap; }
.font small { font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.font.on { border-color: var(--accent); background: var(--accent-soft); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.upload {
  display: flex; align-items: center; gap: 12px; border: 1.5px dashed #C3C8D1; border-radius: var(--r);
  padding: 14px; margin-top: 12px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.upload:hover { border-color: var(--accent); }
.upload input { display: none; }
.upload img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background-color: #fff; background-image: linear-gradient(45deg, #E4E6EA 25%, transparent 25%, transparent 75%, #E4E6EA 75%), linear-gradient(45deg, #E4E6EA 25%, transparent 25%, transparent 75%, #E4E6EA 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.upload small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* order step */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: none; padding: 10px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 2px; }
.linkbtn.reset { margin-top: 14px; }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--accent-2); }
.roster { display: grid; gap: 8px; }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) 72px 90px 54px 28px; gap: 6px; align-items: center; }
.rrow.ind { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 60px 28px; }
.rrow input, .rrow select {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 7px; font: inherit; font-size: 14px;
  width: 100%; background: #fff; min-width: 0; color: var(--text);
}
.rrow .del { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 0; }
.rrow .del:hover { color: var(--err); }
.rrow.bad select[data-f=size] { border-color: var(--err); }
.rhead span { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--accent-2); font-weight: 700; font-size: 13px; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.roster-tools { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0 4px; align-items: center; }
.roster-tools label { cursor: pointer; }
.roster-tools input[type=file] { display: none; }
.paste textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 13px/1.5 ui-monospace, Consolas, monospace; margin-top: 10px; }
.paste .ghost { margin-top: 8px; }
.summary { background: var(--soft); border-radius: var(--r); padding: 14px 16px; margin-top: 18px; }
.summary div { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 9px; font-weight: 700; font-size: 17px; }
.tiers { display: flex; gap: 6px; margin-top: 12px; }
.tiers span {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 2px; color: var(--muted); background: #fff;
}
.tiers span.on { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid2 .wide { grid-column: 1 / -1; }
.err-msg { color: var(--err); font-size: 13px; font-weight: 600; margin: 12px 0 0; }
.err-msg:empty { display: none; }
.done-card { background: #ECF8F1; border: 1px solid #BFE6CF; border-radius: var(--r); padding: 16px; }
.done-card b { display: block; color: var(--ok); font-size: 15px; margin-bottom: 4px; }
.done-card p { margin: 0; font-size: 14px; line-height: 1.5; }

/* AI designer */
.ai-card {
  border: 1.5px solid #C9D5FF; border-radius: 16px; padding: 16px;
  background: linear-gradient(160deg, #F4F7FF 0%, #FFFFFF 60%);
}
.ai-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ai-head svg { width: 26px; height: 26px; flex: none; color: var(--accent); margin-top: 2px; }
.ai-head b { display: block; font-size: 16px; }
.ai-head small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.ai-card textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font: inherit; font-size: 15px; resize: vertical; background: #fff; color: var(--text);
}
.ai-photo { margin-top: 10px; padding: 10px 12px; }
.ai-photo img { width: 48px; height: 48px; object-fit: cover; }
.ai-photo svg { color: var(--accent); flex: none; }
.ai-ex { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.ai-ex .chip { padding: 5px 11px; }
.ai-go { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.ai-opt { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.ai-art { display: flex; justify-content: center; gap: 2px; background: var(--soft); border-radius: 8px; padding: 6px 2px; }
.ai-art svg { height: 92px; width: auto; }
.ai-opt b { font-size: 13px; margin-top: 4px; }
.ai-opt small { font-size: 11px; color: var(--muted); line-height: 1.4; flex: 1; }
.ai-opt .ghost { padding: 8px 6px; font-size: 12px; margin-top: 4px; }

/* dialog + toast */
dialog { border: 0; border-radius: 16px; padding: 22px 24px; max-width: 460px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(10, 12, 16, .55); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h3 { margin: 0; font-size: 20px; }
.size-table { width: 100%; border-collapse: collapse; margin: 14px 0 4px; font-size: 14px; }
.size-table th, .size-table td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.size-table th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 20;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 901px) {
  #menuBtn { display: none; }
  .site-header { grid-template-columns: auto 1fr auto; gap: 24px; }
  .site-logo { justify-self: start; }
  .site-nav { display: flex; position: static; justify-content: center; gap: 4px; padding: 0; border: 0; box-shadow: none; }
  .site-nav a { padding: 8px 12px; font-size: 15px; }
  .site-nav a:hover, .site-nav a.on { background: none; }
  .site-header > .site-nav { grid-column: 2; grid-row: 1; }
  .header-icons { grid-column: 3; }
}
@media (max-width: 900px) {
  :root { --bar-h: 52px; }
  body { display: block; height: auto; }
  .site-header { padding: 6px 12px; }
  .site-logo img { width: 92px; }
  .site-nav a { padding: 13px 20px; }
  .builder-bar {
    position: sticky; top: 0; padding: 8px 12px; gap: 8px; min-height: var(--bar-h);
    overflow-x: auto; scrollbar-width: none;
  }
  .builder-bar::-webkit-scrollbar { display: none; }
  .page-title { display: none; }
  .steps { margin: 0; overflow: visible; flex: none; }
  .step { padding: 5px 10px 5px 5px; font-size: 14px; }
  .step b { width: 22px; height: 22px; }
  .top-actions { padding-left: 8px; border-left: 1px solid var(--line); }
  .top-actions .pill { padding: 6px 12px; font-size: 13px; }
  .builder { display: block; }
  .stage {
    position: sticky; top: var(--bar-h); z-index: 20; height: 40vh; height: 40svh; min-height: 250px;
    padding: 48px 8px 8px; border-bottom: 1px solid var(--line);
  }
  .view-toggle { top: 10px; left: 10px; }
  .cut-toggle { left: auto; right: 10px; }
  .view-toggle button { padding: 6px 10px; font-size: 13px; }
  .stage-note { display: none; }
  .panel { border-left: 0; }
  .panel-body { overflow: visible; padding: 18px 16px 110px; }
  .panel-foot {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06);
  }
  .panel-foot .pill { padding: 10px 16px; }
  .panel h2 { font-size: 22px; }
  .swatches { grid-template-columns: repeat(8, 1fr); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .ai-results { grid-template-columns: 1fr; }
  .ai-art svg { height: 120px; }
}
@media (max-width: 420px) {
  .view-toggle button { padding: 6px 8px; }
  .price strong { font-size: 20px; }
  .price span { font-size: 11px; }
  .rrow { grid-template-columns: minmax(0, 1fr) 64px 78px 46px 22px; gap: 4px; }
  .tpl svg { height: 104px; }
}

/* ---------- embedded in a wrstlr.com page ---------- */
.embed .announce, .embed .site-header, .embed .page-title { display: none; }
.pay-link { display: block; text-align: center; text-decoration: none; margin-top: 14px; padding: 13px 20px; }

/* build mode tabs on step 1 */
.build-tabs { margin-bottom: 18px; }
.build-tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; }
