:root {
  --navy: #12344a;
  --navy-2: #1b4a66;
  --teal: #1f7a8c;
  --teal-soft: #e6f3f5;
  --ink: #1c2830;
  --muted: #5d6d78;
  --line: #d7dee4;
  --paper: #f5f7f9;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 10px 30px rgba(18, 52, 74, 0.08);
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body.is-staff {
  background: #eef2f4;
}

body:not(.is-staff) .staff-only {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  height: 34px;
  width: auto;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

[hidden] {
  display: none !important;
}

.mode-bar {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px 0;
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.view-label.is-on {
  color: var(--navy);
}

.topbar .view-label {
  color: rgba(255, 255, 255, 0.55);
}

.topbar .view-label.is-on {
  color: #fff;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #e6ebef;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.switch.is-on {
  background: var(--teal);
  border-color: var(--teal);
}

.topbar .switch {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.topbar .switch.is-on {
  background: #7ed0d8;
  border-color: #7ed0d8;
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.switch.is-on .switch-knob {
  transform: translateX(20px);
}

.picker {
  min-height: 80vh;
  display: grid;
  place-items: center;
  padding: 8px 16px 48px;
}

.picker-inner {
  width: 100%;
  max-width: 1080px;
  text-align: center;
}

.picker-logo {
  display: block;
  width: min(320px, 74%);
  height: auto;
  margin: 0 auto 24px;
}

.picker-inner h1 {
  margin: 0 0 8px;
  font-size: 2.4rem;
}

.picker-inner > p {
  color: var(--muted);
  margin: 0;
}

.link-back {
  border: 0;
  background: none;
  color: var(--teal);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
  padding: 0 0 12px;
}

.link-back::before {
  content: "\2190  ";
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.brand-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  padding: 18px 22px;
  background: #fff;
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.15s ease;
}

.brand-card:hover {
  transform: translateY(-2px);
}

.brand-card img {
  display: block;
  width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 16px;
  margin-top: 28px;
  text-align: left;
}

.model-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  overflow: hidden;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.model-card:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
}

.model-card img,
.model-card-blank {
  flex: 0 0 240px;
  width: 240px;
  height: 160px;
  object-fit: cover;
  background: linear-gradient(180deg, #dce7ee 0%, #f7f9fb 100%);
}

.model-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
}

.model-card-body .year {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.model-card-body strong {
  font-size: 1.15rem;
}

.model-card-body .from,
.model-card-body span:last-child {
  color: var(--muted);
  font-size: 0.85rem;
}

.model-card.add {
  border-style: dashed;
  box-shadow: none;
  justify-content: center;
  min-height: 160px;
}

.finance-box {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  overflow: hidden;
  min-width: 0;
}

.quote-save {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.finance-box h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: 0.72rem;
}

.finance-pay {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 12px;
  min-width: 0;
}

.finance-pay .finance-amount {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.finance-pay .finance-unit {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.finance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
}

.quote-save {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 18px 0 0;
  max-width: 1100px;
}

.finance-box label,
.quote-save label {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 0;
}

.quote-save label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.finance-box input,
.quote-save input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  font: 600 0.9rem var(--sans);
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 12px 24px;
  background: var(--navy);
  color: #fff;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.model-chip {
  margin-left: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.2;
}

.model-chip span {
  display: block;
  opacity: 0.7;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 10px;
}

.nav-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font: 600 0.88rem var(--sans);
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.nav-btn.is-active {
  background: #fff;
  color: var(--navy);
}

.topbar .view-toggle {
  margin-left: 8px;
}

.screen {
  display: none;
  padding: 20px 24px 96px;
}

.screen.is-active {
  display: block;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#app > main {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.config-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}

.visual-pane {
  position: sticky;
  top: 76px;
  min-width: 0;
  overflow: hidden;
}

.boat-stage {
  background: linear-gradient(180deg, #dce7ee 0%, #f7f9fb 100%);
  border-radius: 16px;
  padding: 18px 16px 10px;
  text-align: center;
}

.boat-stage.has-photo {
  background: none;
  padding: 0;
}

.boat-photo {
  display: none;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  border-radius: 16px;
}

.boat-stage.has-photo .boat-photo {
  display: block;
}

.boat-svg {
  width: 100%;
  height: auto;
}

.boat-stage.has-photo .boat-svg,
.boat-stage.has-photo .photo-hint {
  display: none;
}

.photo-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.spec-pills {
  display: none;
}

.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.visual-totals {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.visual-totals .label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.visual-totals .price {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2px 0 8px;
}

.visual-totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
  color: var(--muted);
}

.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font: 600 0.8rem var(--sans);
  cursor: pointer;
}

.step-btn.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.edit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 12px;
}

.edit-hint {
  margin: 0;
  color: var(--teal);
  font-size: 0.8rem;
}

.step-btn.is-synth {
  opacity: 0.92;
}

.live-step-name {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 7em;
  min-width: 3rem;
  max-width: 8rem;
  padding: 0;
  outline: none;
}

.step-btn.is-on .live-step-name {
  color: #fff;
}

.step-btn.live-add {
  border-style: dashed;
  color: var(--teal);
}

.live-grip {
  display: inline-block;
  width: 12px;
  height: 18px;
  flex-shrink: 0;
  cursor: grab;
  opacity: 0.45;
  background-image: radial-gradient(circle, #8a9ba8 1.1px, transparent 1.15px);
  background-size: 6px 6px;
  background-position: 0 1px;
}

.live-grip:hover,
.card:hover .live-grip,
.live-group-head:hover .live-grip,
.step-btn:hover .live-grip {
  opacity: 1;
}

.live-grip:active {
  cursor: grabbing;
}

.step-btn.is-on .live-grip {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.1px, transparent 1.15px);
}

.live-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 0.75rem var(--sans);
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.55;
}

.live-x:hover {
  color: var(--danger);
  opacity: 1;
}

.card.is-live {
  grid-template-columns: 1fr;
}

.card.is-live .swatches,
.card.is-live .sizes,
.card.is-live .qty {
  grid-column: 1 / -1;
}

.live-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.live-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.live-name,
.live-group-name,
.live-blurb {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  outline: none;
}

.live-name {
  display: block;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

.card.is-live input {
  margin-top: 0;
}

.live-name:focus,
.live-group-name:focus,
.live-blurb:focus,
.live-step-name:focus {
  box-shadow: 0 1px 0 var(--teal);
}

.live-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.75rem;
}

.live-flags label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.live-money {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.live-money label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.live-money input {
  width: 7.5rem;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 2px 0;
  font: 500 0.9rem var(--sans);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.live-money input:focus {
  border-bottom-color: var(--teal);
  outline: none;
}

.live-group-head {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto auto;
  align-items: baseline;
  column-gap: 8px;
  margin: 0 0 6px;
  min-width: 0;
}

.live-group-head h2 {
  margin: 0;
  min-width: 0;
}

.live-group-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.live-type {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 0.78rem var(--sans);
  padding: 0;
  justify-self: end;
}

.blurb .live-blurb {
  color: var(--ink);
  font-size: 0.9rem;
}

.live-requires {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.live-requires-label {
  flex: 0 0 auto;
}

.live-requires select {
  max-width: min(100%, 16rem);
  border: 1px solid var(--line, #d0d5dd);
  border-radius: 6px;
  background: #fff;
  padding: 4px 8px;
  color: inherit;
  font: inherit;
}

.blurb .live-blurb::placeholder {
  color: #9aabb6;
}

.live-add-link {
  display: inline-block;
  margin: 8px 0 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
}

.live-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
  margin: 8px 0 4px;
}

.live-add-row .live-add-link {
  margin: 0;
}

.live-motor {
  margin: 4px 0 2px;
}

.live-catalog {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0 0 12px;
  font: 500 0.78rem var(--sans);
  color: var(--muted);
}

.live-catalog label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-pick {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 0.78rem var(--sans);
  padding: 0;
  max-width: 160px;
}

.live-allow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  flex: 1 1 100%;
}

.live-allow-swatch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.live-allow-swatch i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.live-catalog-note {
  flex: 1 1 100%;
  margin: 0;
  color: var(--muted);
}

.live-add-group {
  margin: 4px 0 18px;
}

.is-drop {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.step-btn.is-drop {
  background: var(--teal-soft);
  color: var(--navy);
}

.is-dragging {
  opacity: 0.45;
}

.warnings {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f0c1bc;
  background: #fdecea;
  color: #7a271a;
  border-radius: 10px;
  font-size: 0.9rem;
}

.warnings.has-conflict {
  border-color: #ead38a;
  background: #fff8e6;
  color: #6b4e12;
}

.conflict-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.conflict-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.conflict-note + .conflict-note,
.conflict-note + div,
.warnings.has-conflict > div + .conflict-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(107, 78, 18, 0.15);
}

.conflict-note p {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.conflict-note .revert-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .conflict-note {
    flex-direction: column;
  }
}

.group {
  margin: 0 0 22px;
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 0 0 6px;
}

.group-head h2,
.group h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.group-head h2 {
  margin: 0;
}

.opt-sort {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  flex-shrink: 0;
}

.opt-sort-btn {
  border: 0;
  background: none;
  padding: 0 5px;
  color: #9aabb6;
  font: 500 0.72rem var(--sans);
  cursor: pointer;
}

.opt-sort-btn:hover {
  color: var(--ink);
}

.opt-sort-btn.is-on {
  color: var(--muted);
}

.opt-sort-btn + .opt-sort-btn {
  border-left: 1px solid var(--line);
  padding-left: 7px;
}

.group .blurb {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.group.is-blocked {
  opacity: 0.48;
}

.group.is-blocked .card {
  cursor: pointer;
}

.blocked-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  min-height: 84px;
}

.card:hover {
  border-color: #b7c5d0;
}

.card.is-on {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.card.locked {
  cursor: default;
  opacity: 0.9;
}

.card.is-blocked {
  opacity: 0.48;
  filter: grayscale(0.25);
  cursor: pointer;
}

.card input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.card .name-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  position: relative;
}

.card .name {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}

.credit-tip {
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
}

.credit-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--teal);
  cursor: help;
}

.credit-info:hover,
.credit-info[aria-expanded="true"] {
  color: var(--navy);
}

.credit-tip-bubble {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 5;
  width: min(260px, 70vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: var(--shadow);
}

.card .price .credit-price {
  color: var(--teal);
}

.card .note,
.card .meta {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.card .price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.card .list-price,
.card .staff-bits {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 4px;
}

.swatches,
.sizes,
.qty {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #b7c5d0;
  cursor: pointer;
  padding: 0;
}

.swatch.is-on {
  box-shadow: 0 0 0 2px var(--teal);
}

.color-name {
  align-self: center;
  margin-left: 2px;
  color: var(--ink);
  font: 600 0.82rem var(--sans);
}

.size-btn,
.qty button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font: 600 0.8rem var(--sans);
}

.size-btn.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.size-btn.is-blocked {
  opacity: 0.45;
}

.qty input {
  width: 48px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  font: 600 0.95rem var(--sans);
}

.dock {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 18px auto 0;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.dock .grow {
  flex: 1;
}

.dock .dock-price {
  font-size: 1.25rem;
  font-weight: 700;
}

.dock .dock-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font: 650 0.92rem var(--sans);
  cursor: pointer;
}

.btn.primary {
  background: var(--navy);
  color: #fff;
}

.btn.ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn.tiny {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.danger-text {
  color: var(--danger);
}

.empty {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--muted);
}

.page-head {
  max-width: 1100px;
  margin: 0 auto 24px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.page-head p {
  max-width: 60ch;
  color: var(--muted);
}

.discount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto 28px;
}

.discount-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 14px;
}

.discount-card > label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.pct-input {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.pct-input input {
  width: 100%;
  min-width: 0;
  font: 700 1.9rem var(--sans);
  color: var(--ink);
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  padding: 0 0 2px;
}

.pct-input input:focus {
  outline: none;
  border-bottom-color: var(--teal);
}

.pct-input span {
  font: 700 1.1rem var(--sans);
  color: var(--muted);
  white-space: nowrap;
}

.pct-input.is-margin {
  margin-top: 10px;
}

.pct-input.is-margin input {
  font-size: 1.25rem;
}

.pct-input.is-margin span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.discount-note {
  margin: 10px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.discount-card.total {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.discount-card.total > label,
.discount-card.total .discount-note {
  color: rgba(255, 255, 255, 0.7);
}

.discount-total {
  margin-top: 6px;
  font: 700 1.9rem var(--sans);
}

.table-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.special-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.price-table tr.is-special {
  background: #fffaf0;
}

.price-table tr.is-special input {
  border-color: #d9a441;
  font-weight: 700;
}

.sell-cell {
  font-weight: 600;
  white-space: nowrap;
}

.sell-flag {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a9741a;
}

.brand-admin {
  display: grid;
  gap: 20px;
  margin-top: 36px;
  text-align: left;
}

.table-wrap {
  max-width: 1100px;
  margin: 0 auto;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.price-table th,
.price-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.price-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-table input {
  width: 110px;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font: 500 0.9rem var(--sans);
}

.sticker-toolbar {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.sticker-edit-hint {
  margin: 8px 0 0;
  color: var(--teal);
  font-size: 0.8rem;
}

.sticker-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.sticker-toolbar select {
  font: 600 0.95rem var(--sans);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.sticker-toolbar label.sticker-prices-toggle {
  flex-direction: row;
  align-items: center;
  align-self: flex-end;
  gap: 8px;
  height: 39px;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.sticker-toolbar label.sticker-prices-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  accent-color: var(--navy);
}

.sticker-stage {
  width: 100%;
  margin: 20px 0 10px;
  overflow-x: auto;
}

.sticker-print-note {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

#sticker-print-frame {
  position: fixed;
  left: 0;
  top: 0;
  width: 11in;
  height: 8.5in;
  border: 0;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.sticker {
  width: 11in;
  height: 8.5in;
  margin: 0 auto;
  background: #fff;
  color: #17202a;
  /* Most printers cannot ink the last ~1/4" of the sheet. Keep the design
     inside that zone so preview and print match and nothing gets clipped. */
  padding: 0.25in;
  border: 0;
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 0.52in minmax(0, 1fr);
  overflow: hidden;
  box-sizing: border-box;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

#sticker-print-host {
  position: fixed;
  left: 0;
  top: 0;
  width: 11in;
  height: 8.5in;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  outline: 0;
  box-shadow: none;
}

.sticker-rail {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.sticker-rail-name,
.sticker-rail-loc {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 600;
}

.sticker-rail-name {
  color: #fff;
}

.sticker-rail-loc {
  color: rgba(255, 255, 255, 0.65);
}

.sticker-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.sticker-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sticker-head {
  --sticker-money-w: 3.15in;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sticker-money-w);
}

.sticker-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 18px;
  min-width: 0;
}

.sticker-logo {
  display: block;
  width: 220px;
  height: auto;
  flex-shrink: 0;
}

.sticker-brand-text {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.sticker-year {
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  white-space: nowrap;
}

.sticker h2 {
  font-size: 2.75rem;
  line-height: 1;
  margin: 5px 0 0;
  font-weight: 700;
  white-space: nowrap;
}

.sticker-motor {
  margin: 6px 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  white-space: nowrap;
}

.sticker-money {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--navy);
  color: #fff;
}

.sticker-money-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 18px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  min-width: 0;
}

.sticker-money-block:last-child {
  border-bottom: 0;
}

.sticker-money-block .label {
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.78;
}

.sticker-money-block .amount,
.sticker-money-block .save {
  font-size: 1.14rem;
  font-weight: 700;
  margin: 1px 0 0;
  line-height: 1.15;
}

.sticker-money-block .sub {
  font-size: 0.6rem;
  opacity: 0.78;
  margin-top: 1px;
  line-height: 1.25;
}

.sticker-specs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--spec-count, 1), minmax(0, 1fr));
  background: #f4f7f9;
  border-bottom: 1px solid var(--line);
}

.sticker-spec {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 8px 6px;
  border-right: 1px solid #e4eaee;
  min-width: 0;
}

.sticker-spec:last-child {
  border-right: 0;
}

.sticker-spec span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.56rem;
  text-align: center;
}

.sticker-spec strong {
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  max-width: 100%;
}

.sticker-side {
  flex: 1;
  padding: 12px 18px 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.sticker h3 {
  margin: 0 0 8px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sticker-opts {
  --sticker-opt-size: 0.74rem;
  --sticker-opt-pad: 4px 8px;
  --sticker-group-gap: 10px;
  --sticker-cols: 2;
  --sticker-head-size: 0.68rem;
  column-count: var(--sticker-cols);
  column-gap: 22px;
  /* Fill left → right so leftover space sits in the last column (not a gap in the middle). */
  column-fill: auto;
  -webkit-column-fill: auto;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.sticker-opts.is-dense {
  --sticker-cols: 3;
  --sticker-opt-size: 0.62rem;
  --sticker-opt-pad: 2px 6px;
  --sticker-group-gap: 7px;
  column-gap: 16px;
}

.sticker.is-editing {
  height: auto;
  min-height: 8.5in;
  overflow: visible;
}

.sticker.is-editing .sticker-body,
.sticker.is-editing .sticker-content,
.sticker.is-editing .sticker-side {
  overflow: visible;
  height: auto;
  flex: none;
}

.sticker.is-editing .sticker-opts {
  overflow: visible;
  flex: none;
  height: auto;
}

.sticker-group {
  break-inside: auto;
  -webkit-column-break-inside: auto;
  page-break-inside: auto;
  margin: 0 0 var(--sticker-group-gap);
}

.sticker-group h4,
.sticker-group-head {
  break-inside: avoid;
  break-after: avoid;
  -webkit-column-break-after: avoid;
  page-break-after: avoid;
}

.sticker-group.is-drop,
.sticker-opt.is-drop {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.sticker-group h4,
.sticker-group-name {
  margin: 0 0 2px;
  padding: 4px 8px;
  font-size: var(--sticker-head-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy);
  background: #eef3f6;
  border-left: 3px solid var(--teal);
}

.sticker-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
}

.sticker-group-name {
  flex: 1;
  min-width: 0;
  border: 0;
  width: 100%;
  font: inherit;
}

.sticker-add-group {
  break-inside: avoid;
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  font: 600 0.78rem var(--sans);
  cursor: pointer;
}

.sticker-opt {
  display: inline-grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: start;
  padding: var(--sticker-opt-pad);
  border-bottom: 1px solid #eef1f4;
  font-size: var(--sticker-opt-size);
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.sticker-opt.is-live {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  column-gap: 6px;
}

.sticker-opt.is-off {
  opacity: 0.42;
}

.sticker-opt.is-off .sticker-opt-name {
  text-decoration: line-through;
}

.sticker-opt .live-grip {
  align-self: center;
}

.sticker-eye {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 14px;
  flex: 0 0 14px;
  flex-shrink: 0;
  align-self: center;
  line-height: 0;
  opacity: 0.6;
}

.sticker-eye:hover,
.sticker-opt.is-off .sticker-eye {
  color: var(--navy);
  opacity: 1;
}

.sticker-opt-name {
  min-width: 0;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card .price .was-price {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: line-through;
  margin-bottom: 1px;
}

.card .price .now-price {
  display: block;
}

.sticker-opt-price {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
  justify-self: end;
}

.sticker-opt-price .was-price {
  color: #8a939c;
  font-weight: 500;
  text-decoration: line-through;
  margin-right: 6px;
}

.sticker-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sticker-foot {
  flex-shrink: 0;
  padding: 8px 18px 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.ed-specs {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.ed-spec-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}

.ed-spec-row input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: 500 0.9rem var(--sans);
}

@media (max-width: 980px) {
  .config-shell,
  .dock,
  .finance-grid,
  .quote-save {
    display: flex;
    flex-direction: column;
  }

  .nav {
    margin-left: 0;
  }

  .visual-pane {
    position: static;
  }
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

#editor-body {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.ed-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 24px;
}

.ed-block > h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.ed-block > h2 + .ed-fields {
  margin-top: 10px;
}

.ed-block h3 {
  margin: 24px 0 10px;
  font-size: 0.95rem;
}

.ed-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 16px;
  max-width: 70ch;
}

.ed-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.ed-fields label,
.ed-newmodel-row label,
.ed-group-meta label,
.ed-move {
  display: grid;
  gap: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}

.ed-fields input,
.ed-fields select,
.ed-newmodel-row input,
.ed-newmodel-row select,
.ed-group-meta input,
.ed-group-meta select,
.ed-table input,
.ed-table select,
.ed-move select,
.ed-step-name {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: 500 0.88rem var(--sans);
  background: #fff;
  color: var(--ink);
}

.ed-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ed-check input {
  width: auto;
  accent-color: var(--teal);
}

.ed-newmodel-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.ed-block > .btn {
  margin-top: 16px;
}

.ed-step-jump {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 -22px 20px;
  padding: 10px 22px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.ed-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
}

.ed-step-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.ed-step-chip span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.72rem;
}

/* One block per Build-page tab. Sticky header so you always know which step you are in. */
.ed-step-block {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 14px;
  padding: 0 0 18px;
  margin-bottom: 22px;
  background: #f3f7f8;
  scroll-margin-top: 96px;
}

.ed-step-block:last-of-type {
  margin-bottom: 8px;
}

.ed-step-block.is-loose {
  border-left-color: #8a97a1;
  background: #f4f5f6;
}

.ed-step-block-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #e7f0f2;
  border-bottom: 1px solid var(--line);
  border-radius: 13px 13px 0 0;
}

.ed-step-block.is-loose .ed-step-block-head {
  background: #eceef0;
}

.ed-step-block-head h4 {
  margin: 0;
  font-size: 1.05rem;
}

.ed-step-name {
  flex: 1;
  min-width: 140px;
  max-width: 280px;
  font: 700 1.05rem var(--sans);
  border-color: transparent;
  background: transparent;
  padding: 6px 8px;
}

.ed-step-name:hover,
.ed-step-name:focus {
  border-color: var(--line);
  background: #fff;
}

.ed-step-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.ed-step-block-head .ed-group-tools {
  margin-left: auto;
}

.ed-step-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
}

.ed-step-block.is-loose .ed-step-num {
  color: var(--muted);
}

.ed-empty-step {
  margin: 0 16px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.ed-rule-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 14px;
  background: #f8fafb;
}

.ed-rule-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ed-rule-card-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.ed-rule-card .ed-wide {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ed-rule-card .ed-wide input,
.ed-rule-side > label select,
.ed-rule-advanced label select {
  font: 500 0.9rem var(--sans);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ed-rule-mini {
  margin: 12px 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.ed-rule-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.ed-rule-side {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.ed-rule-side > label {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ed-opt-pick {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  justify-items: start;
  width: 100%;
}

.ed-opt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 1.5rem;
  align-items: center;
  width: 100%;
}

.ed-opt-empty {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

.ed-opt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.25;
}

.ed-opt-chip-x {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 1rem;
  line-height: 1;
  border-radius: 999px;
}

.ed-opt-chip-x:hover {
  color: var(--ink);
  background: #eef3f6;
}

.ed-opt-add {
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  font: 600 0.82rem var(--sans);
  cursor: pointer;
  white-space: nowrap;
}

.ed-opt-add:hover,
.ed-opt-add.is-open {
  text-decoration: underline;
}

/* Finder-style column browser */
.ed-opt-browser {
  width: min(100%, 34rem);
  border: 1px solid #c5c5c7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ed-opt-browser-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 220px;
  background: #fff;
}

.ed-opt-browser-col {
  overflow: auto;
  border-right: 1px solid #d8d8da;
  background: #fff;
}

.ed-opt-browser-col:last-child {
  border-right: 0;
}

.ed-opt-browser-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 5px 8px 5px 10px;
  text-align: left;
  color: #1d1d1f;
  font: 400 0.8rem/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: default;
}

.ed-opt-browser-row:hover {
  background: #f2f2f3;
}

.ed-opt-browser-row.is-on {
  background: #0a84ff;
  color: #fff;
}

.ed-opt-browser-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-opt-browser-chev {
  flex: 0 0 auto;
  opacity: 0.45;
  font-size: 0.95rem;
  line-height: 1;
}

.ed-opt-browser-row.is-on .ed-opt-browser-chev {
  opacity: 0.9;
  color: #fff;
}

.ed-opt-browser-hint {
  margin: 14px 10px;
  color: #8e8e93;
  font-size: 0.78rem;
}

.ed-opt-browser-close {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid #d8d8da;
  background: #f5f5f7;
  padding: 7px 10px;
  color: #6e6e73;
  font: 500 0.78rem -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  text-align: left;
}

.ed-opt-browser-close:hover {
  color: #1d1d1f;
}

.ed-rule-advanced {
  margin-top: 8px;
}

.ed-rule-advanced summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

@media (max-width: 800px) {
  .ed-rule-cols {
    grid-template-columns: 1fr;
  }
}

.ed-step-block-foot {
  padding: 4px 16px 0;
}

.ed-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 0;
  margin: 0 16px 14px;
  background: #fff;
}

.ed-group-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.ed-group-title {
  flex: 1 1 160px;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 6px 8px;
  font: 700 1.05rem var(--sans);
  color: var(--ink);
}

.ed-group-title:hover,
.ed-group-title:focus {
  border-color: var(--line);
  background: #fff;
}

.ed-group-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ed-move {
  min-width: 140px;
}

.ed-move select {
  font-size: 0.8rem;
  padding: 5px 8px;
}

.ed-where {
  margin: 0 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ed-group-meta {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(180px, 1fr);
  gap: 12px 16px;
  align-items: end;
  margin: 0 0 16px;
  padding: 0 8px;
}

.ed-group-meta .ed-wide {
  grid-column: 1 / -1;
}

.ed-group-meta .ed-check {
  white-space: normal;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
  padding-bottom: 6px;
}

.ed-group .table-wrap,
.ed-options {
  margin: 0 -16px 0;
  max-width: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  background: #fff;
}

.ed-add-row td {
  padding: 0;
  border-bottom: 0;
}

.ed-add-option {
  display: block;
  width: 100%;
  border: 0;
  background: #f7fafb;
  color: var(--teal);
  font: 650 0.9rem var(--sans);
  text-align: left;
  padding: 14px 18px;
  cursor: pointer;
  border-radius: 0 0 12px 12px;
}

.ed-add-option:hover {
  background: var(--teal-soft);
}

.ed-palette {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.ed-palette:last-of-type {
  border-bottom: 0;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.ed-palette-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.ed-palette-title {
  flex: 1 1 180px;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 0;
  font: 650 1.05rem var(--sans);
  background: transparent;
}

.ed-palette-colors {
  display: grid;
  gap: 8px;
}

.ed-color-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1.2fr) minmax(90px, 0.7fr) 36px auto;
  gap: 8px;
  align-items: center;
}

.ed-color-chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ed-color-row input[type="text"],
.ed-color-row input:not([type]),
.ed-color-row input[type="color"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: 500 0.88rem var(--sans);
}

.ed-color-row input[type="color"] {
  padding: 2px;
  height: 36px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .ed-color-row {
    grid-template-columns: 22px minmax(0, 1fr) 36px auto;
  }

  .ed-color-row input[data-field="hex"] {
    display: none;
  }
}

.ed-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.ed-size-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 0.85rem var(--sans);
}

.ed-size-chip button {
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 1rem var(--sans);
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.ed-add-size {
  display: grid;
  gap: 5px;
  max-width: 220px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ed-add-size input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: 500 0.9rem var(--sans);
  text-transform: none;
  letter-spacing: 0;
}

.ed-palette-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.ed-motor-pick {
  position: relative;
  padding: 14px 18px 8px;
  background: #f7fafb;
  border-bottom: 1px solid var(--line);
}

.ed-motor-pick.is-compact {
  padding: 0;
  background: none;
  border: 0;
}

.ed-motor-pick.is-compact .ed-motor-toggle {
  width: auto;
  max-width: 100%;
  border: 0;
  box-shadow: none;
  padding: 0 22px 0 0;
  background-color: transparent;
  background-position: right 2px center;
  color: var(--teal);
  font: 600 0.85rem var(--sans);
}

.ed-motor-pick.is-compact.is-open .ed-motor-toggle {
  border: 0;
  box-shadow: none;
}

.ed-motor-toggle {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 36px 9px 12px;
  font: 500 0.9rem var(--sans);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235d6d78' d='M1.2 1.2 6 6l4.8-4.8'/></svg>") no-repeat right 12px center;
  color: var(--ink);
  cursor: pointer;
}

.ed-motor-pick.is-open .ed-motor-toggle {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.ed-motor-menu {
  display: none;
  position: fixed;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(28, 40, 48, 0.16);
  overflow: hidden;
}

.ed-motor-pick.is-open .ed-motor-menu {
  display: block;
}

.ed-motor-cols {
  display: flex;
  align-items: stretch;
  max-height: min(360px, 70vh);
  overflow: auto;
}

.ed-motor-col {
  min-width: 168px;
  max-width: 220px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.ed-motor-col[data-col="motor"] {
  min-width: 280px;
  max-width: 360px;
}

.ed-motor-col:last-child:not([hidden]) {
  border-right: 0;
}

.ed-motor-col-head,
.ed-motor-sub {
  padding: 10px 12px 6px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ed-motor-sub {
  padding-top: 12px;
  background: #fafbfc;
}

.ed-motor-choice {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  font: 500 0.86rem var(--sans);
  color: var(--ink);
  cursor: pointer;
}

.ed-motor-choice:hover,
.ed-motor-choice.is-on {
  background: var(--teal-soft);
}

.ed-motor-choice.is-on {
  color: var(--teal);
}

.ed-motor-choice-name {
  min-width: 0;
}

.ed-motor-choice-meta,
.ed-motor-caret {
  flex: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ed-motor-sku {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.ed-motor-sku .ed-motor-choice-meta {
  font-size: 0.78rem;
}

.ed-motor-sku.is-over .ed-motor-choice-meta {
  color: #9a4a12;
}

.ed-motor-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.ed-motor-pick .ed-note {
  margin: 8px 0 6px;
}

.ed-add-row .ed-add-option {
  border-radius: 0;
}

.ed-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.ed-table td:first-child input {
  min-width: 150px;
}

.ed-table th,
.ed-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.ed-table th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fafbfc;
}

.ed-table .num {
  text-align: right;
}

.ed-table .num input {
  text-align: right;
  max-width: 110px;
  margin-left: auto;
}

.ed-table .flags {
  display: table-cell;
}

.ed-table .flags label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 10px 2px 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.ed-table .flags input {
  width: auto;
  accent-color: var(--teal);
}

.ed-empty {
  color: var(--muted);
}

.ed-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media print {
  html,
  body {
    background: #fff !important;
    height: 8.5in;
    width: 11in;
    overflow: hidden;
  }

  .mode-bar,
  #screen-editor {
    display: none !important;
  }

  .topbar,
  .no-print,
  .dock,
  #screen-build,
  #screen-pricing,
  #screen-quotes {
    display: none !important;
  }

  #app {
    display: block !important;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }

  #app > main {
    height: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
  }

  #screen-sticker {
    display: block !important;
    padding: 0 !important;
    height: 100%;
    overflow: hidden;
  }

  .sticker-stage {
    overflow: hidden;
    padding: 0;
    margin: 0;
  }

  .sticker {
    box-shadow: none;
    outline: 0;
    border: 0;
    margin: 0;
    width: 11in;
    height: 8.5in;
  }

  #sticker-print-frame {
    display: none !important;
  }

  @page {
    size: landscape letter;
    margin: 0;
  }

  @page {
    @top-left {
      content: none;
    }
    @top-center {
      content: none;
    }
    @top-right {
      content: none;
    }
    @bottom-left {
      content: none;
    }
    @bottom-center {
      content: none;
    }
    @bottom-right {
      content: none;
    }
  }
}

html.print-sheet-page,
html.print-sheet-page body {
  margin: 0;
  background: #fff !important;
  width: 11in;
  height: 8.5in;
  overflow: hidden;
}

html.print-sheet-page body {
  display: block;
}

html.print-sheet-page .sticker {
  box-shadow: none;
  outline: 0;
  border: 0;
  margin: 0;
  width: 11in;
  height: 8.5in;
}

@media print {
  html.print-sheet-page,
  html.print-sheet-page body {
    width: 11in;
    height: 8.5in;
  }

  html.print-sheet-page .sticker {
    margin: 0;
    width: 11in;
    height: 8.5in;
  }
}
