/* Design page: mockup on the left, controls in the middle, price on the right (stacked on phones). */
.studio { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 300px; gap: 24px; padding: 28px 0 60px; align-items: start; }
@media (max-width: 1180px) { .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .price-card { grid-column: 1 / -1; } }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; padding-top: 14px; padding-bottom: 150px; } }

.stage-col { position: sticky; top: 88px; }
@media (max-width: 760px) { .stage-col { position: static; } }
.side-tabs { display: inline-flex; background: var(--bg-2); border-radius: var(--r-pill); padding: 4px; margin-bottom: 12px; }
.side-tabs button { border: 0; background: none; padding: 8px 20px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.side-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-soft); }
.side-tabs button.has-art::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: middle; }

.stage { position: relative; aspect-ratio: 600 / 700; background: var(--bg-2); border-radius: var(--r-lg); user-select: none; -webkit-user-select: none; touch-action: none; overflow: hidden; }
.garment, .garment svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.print-area { position: absolute; outline: 1.5px dashed rgba(107, 112, 92, .55); outline-offset: 0; }
.stage.dark-shirt .print-area { outline-color: rgba(255, 255, 255, .4); }
.area-label { position: absolute; left: 0; top: -22px; font-size: 11px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.stage.dark-shirt .area-label { color: rgba(255,255,255,.7); }
.design { position: absolute; cursor: grab; touch-action: none; }
.design:active { cursor: grabbing; }
.design img { width: 100%; height: 100%; display: block; pointer-events: none; }
.design::after { content: ""; position: absolute; inset: -1px; border: 1px solid rgba(107, 112, 92, .9); pointer-events: none; }
.handle { position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  background: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: nwse-resize; padding: 0; touch-action: none; }
.stage-hint { color: var(--muted); font-size: 13.5px; margin: 12px 4px 0; text-align: center; }

.panel { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-soft); }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 14px; }
.card-title span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-deep); font-size: 13px; }
.card-sub { color: var(--muted); font-size: 14px; margin: -6px 0 12px; }

.styles { display: grid; gap: 8px; }
.style-opt { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px 8px 8px; cursor: pointer; }
.style-opt:hover { border-color: var(--line-strong); }
.style-opt[aria-pressed="true"] { border-color: var(--text-strong); }
.style-opt .thumb { width: 44px; height: 50px; }
.style-opt b { display: block; font-size: 14.5px; color: var(--text-strong); }
.style-opt small { color: var(--muted); font-size: 12.5px; }
.style-opt .from { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.style-opt .from b { font-size: 15px; }

.colors-head { margin: 18px 0 10px; font-size: 14px; }
.colors-head span { color: var(--muted); }
.colors { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; position: relative; }
.swatch[aria-checked="true"]::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--text-strong); }

.drop { display: grid; gap: 4px; place-items: center; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm);
  padding: 22px 16px; cursor: pointer; background: var(--bg); transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-wash); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop b { color: var(--text-strong); }
.drop span { font-size: 13px; color: var(--muted); }

.art-tools { display: grid; gap: 14px; }
.art-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.art-size b { display: block; font-family: var(--font-display); font-size: 20px; color: var(--text-strong); }
.art-size span { font-size: 13px; color: var(--muted); }
.quality { font-size: 12.5px; font-weight: 600; border-radius: var(--r-pill); padding: 5px 11px; }
.quality.good { background: var(--good-wash); color: var(--good); }
.quality.warn { background: var(--warn-wash); color: var(--warn); }
.quality.bad { background: var(--bad-wash); color: var(--bad); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-pill); padding: 6px 13px; font-size: 13px; cursor: pointer; }
.presets button:hover { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; margin-top: 4px; }
.check input { width: 18px; height: 18px; accent-color: var(--text-strong); }
.art-actions { display: flex; gap: 8px; }
.side-note { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }
.side-note button { border: 0; background: none; padding: 0; color: var(--accent-deep); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: inherit; }

.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.sizes label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; }
.sizes input { width: 100%; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 9px 4px; background: var(--field); font-size: 16px; color: var(--text-strong); }
.sizes input:focus { border-color: var(--accent); outline: none; }
.sizes .up { font-weight: 500; font-size: 11px; color: var(--faint); }
#qty-note { margin: 12px 0 6px; }

.price-card { position: sticky; top: 88px; background: var(--dark); color: var(--on-dark); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 14px; box-shadow: var(--shadow-lift); }
.price-top { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.price-big { font-family: var(--font-display); font-size: 42px; font-weight: 800; line-height: 1; font-stretch: 110%; font-variation-settings: "wdth" 110; }
.price-sub { color: var(--on-dark-muted); font-size: 13.5px; margin-top: 6px; }
.price-total { text-align: right; }
.price-total span { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.price-total b { font-family: var(--font-display); font-size: 22px; }
.price-lines { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--dark-line); display: grid; gap: 7px; font-size: 14px; }
.price-lines li { display: flex; justify-content: space-between; gap: 12px; color: var(--on-dark-muted); }
.price-lines li span:last-child { color: var(--on-dark); white-space: nowrap; }
.nudge { background: rgba(215, 201, 184, .14); border: 1px solid var(--dark-line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; color: var(--accent-on-dark); }
.nudge button { border: 0; background: none; color: var(--on-dark); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }
.price-msg { margin: 0; font-size: 14px; color: var(--accent-on-dark); }
.price-msg:empty { display: none; }
.price-card .btn-main { background: var(--on-dark); color: var(--dark); width: 100%; }
.price-fine { margin: 0; font-size: 12.5px; color: var(--on-dark-muted); text-align: center; }

/* Phones: the price card becomes a bar pinned to the bottom. */
@media (max-width: 760px) {
  .price-card { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; border-radius: 20px 20px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
  .price-card .price-lines, .price-card .price-fine { display: none; }
  .price-card .nudge, .price-card .price-msg { grid-column: 1 / -1; order: -1; }
  .price-big { font-size: 28px; }
  .price-total { display: none; }
  .price-card .btn-main { width: auto; }
}

/* Contact sheet */
.sheet { border: 0; border-radius: var(--r-lg); padding: 0; width: min(560px, 100% - 24px); max-height: calc(100dvh - 24px); box-shadow: var(--shadow-lift); background: var(--surface); color: var(--text); }
.sheet::backdrop { background: rgba(23, 23, 23, .55); }
.sheet form { padding: 26px; display: grid; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.sheet h2 { font-size: 24px; }
.sheet .x { border: 0; background: var(--bg-2); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.sheet .muted { margin: 0; font-size: 14.5px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields label { display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.fields label i { font-style: normal; font-weight: 400; color: var(--faint); }
.fields .wide { grid-column: 1 / -1; }
.fields input, .fields textarea { border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 11px 12px; background: var(--field); font-size: 16px; font-weight: 400; color: var(--text-strong); width: 100%; }
.fields input:focus, .fields textarea:focus { border-color: var(--accent); outline: none; }
.sheet .price-fine { color: var(--muted); }
.form-error { margin: 0; color: var(--bad); font-size: 14px; }
.form-error:empty { display: none; }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; } }
