.bll {
  --bll-bg: #141618;
  --bll-panel: #1c1f23;
  --bll-line: #34383e;
  --bll-text: #f4f1ea;
  --bll-muted: #b7b1a6;
  --bll-brass: #d4b483;
  --bll-brass-ink: #241c12;
  --bll-warn: #3a3324;
  --bll-warn-ink: #f3e2b8;
  box-sizing: border-box;
  max-width: 1080px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  color: var(--bll-text);
  background: var(--bll-bg);
  border: 1px solid var(--bll-line);
  border-radius: 16px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

.bll *,
.bll *::before,
.bll *::after {
  box-sizing: border-box;
}

.bll h2,
.bll p,
.bll label,
.bll legend {
  color: inherit;
}

.bll-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bll-price {
  margin: 0.2rem 0 0;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--bll-brass);
}

.bll-is-hidden {
  display: none !important;
}

.bll-policy {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--bll-line);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.bll-policy h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.bll-policy p {
  margin: 0.35rem 0 0;
}

.bll-frozen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.bll-head p,
.bll-help,
.bll-seam-note,
.bll-id {
  color: var(--bll-muted);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bll-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(280px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.bll-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.bll-compare figure {
  margin: 0;
}

.bll-compare figcaption {
  margin-bottom: 0.3rem;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bll-muted);
}

.bll-thumb {
  min-height: 72px;
  background: #0e0f11;
  border: 1px solid var(--bll-line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bll-thumb img,
.bll-thumb svg {
  max-width: 100%;
  max-height: 110px;
  width: auto;
  height: auto;
}

.bll-stage {
  background: #0e0f11;
  border-radius: 12px;
  padding: 0.75rem;
  outline: none;
}

.bll-stage:focus {
  box-shadow: 0 0 0 2px var(--bll-brass);
}

.bll-stage svg {
  display: block;
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto;
  background: #0e0f11;
  touch-action: none;
}

#bll-metal path {
  fill: url(#bll-shade);
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 0.15;
}

#bll-seam {
  stroke: #f4e4b8;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  pointer-events: none;
}

#bll-zone {
  fill: none;
  stroke: rgba(212, 180, 131, 0.45);
  stroke-width: 0.2;
  stroke-dasharray: 0.8 0.6;
  pointer-events: none;
}

#bll-box {
  fill: transparent;
  stroke: #f4f1ea;
  stroke-width: 0.22;
  cursor: move;
}

#bll-handle {
  fill: var(--bll-brass);
  stroke: #241c12;
  stroke-width: 0.15;
  cursor: nwse-resize;
}

#bll-art {
  pointer-events: none;
}

.bll-panel {
  background: var(--bll-panel);
  border: 1px solid var(--bll-line);
  border-radius: 12px;
  padding: 1rem;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
}

.bll fieldset {
  margin: 0 0 0.9rem;
  padding: 0;
  border: 0;
}

.bll legend {
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bll-finishes,
.bll-areas,
.bll-tools,
.bll-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bll-finish {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  color: var(--bll-text);
  background: transparent;
  border: 1px solid var(--bll-line);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.bll-finish.is-selected {
  border-color: var(--bll-brass);
  box-shadow: inset 0 0 0 1px var(--bll-brass);
}

.bll-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.bll-areas label,
.bll-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.bll-field,
.bll-process,
.bll-matte {
  margin-bottom: 0.85rem;
}

.bll-field label,
.bll-process label,
.bll-matte label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bll input[type="text"],
.bll input[type="email"],
.bll input[type="file"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  color: var(--bll-text);
  background: #121416;
  border: 1px solid var(--bll-line);
  border-radius: 8px;
  font: inherit;
}

.bll input[type="range"] {
  width: 100%;
}

.bll-matte-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.bll-matte-row > div:first-child {
  flex: 1;
}

.bll input[type="color"] {
  width: 2.6rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--bll-line);
  background: transparent;
}

.bll-warning,
.bll-frozen {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
  color: var(--bll-warn-ink);
  background: var(--bll-warn);
  border-radius: 8px;
  font-size: 0.88rem;
}

.bll-status.is-busy::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.4rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: bll-spin 0.7s linear infinite;
}

@keyframes bll-spin {
  to { transform: rotate(360deg); }
}

.bll button {
  appearance: none;
  padding: 0.55rem 0.8rem;
  color: var(--bll-text);
  background: transparent;
  border: 1px solid var(--bll-line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.bll button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bll button.bll-primary {
  color: var(--bll-brass-ink);
  background: var(--bll-brass);
  border-color: var(--bll-brass);
}

.bll-actions {
  margin-top: 0.4rem;
}

.bll-status {
  min-height: 1.2rem;
  margin: 0.2rem 0 0.6rem;
  font-size: 0.92rem;
}

.bll-status.is-error {
  color: #ffb4a8;
}

.bll-status a {
  color: var(--bll-brass);
}

@media (max-width: 800px) {
  .bll {
    padding: 0.9rem;
  }

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

  .bll-stage svg {
    width: min(100%, 280px);
  }
}
