/* Простой конструктор: 4 шага, план сверху, кнопка «Отправить мастеру» всегда внизу. */
body.studio { padding-bottom: 96px; }
.bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 8px; height: 56px; }
.bar .title { font-family: var(--display); font-weight: 700; font-size: 18px; margin-right: auto; }
.back, .icon { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; text-decoration: none; border: 0; background: none; border-radius: 50%; cursor: pointer; color: inherit; transition: background-color .2s; }
.back:hover, .icon:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.st-grid { display: grid; gap: 18px; padding-top: 12px; }
.st-stage { display: grid; gap: 10px; align-content: start; }
.seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg3 button { border: 0; background: none; border-radius: 999px; padding: 10px 4px; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color .3s, color .3s; color: var(--ink); }
.seg3 button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.st-canvas { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--ink) 5%, transparent) 23px 24px), repeating-linear-gradient(90deg, transparent 0 23px, color-mix(in srgb, var(--ink) 5%, transparent) 23px 24px), var(--surface); }
.st-canvas canvas { display: block; width: 100%; aspect-ratio: 1; }
.st-sum { font-size: 14px; color: var(--muted); }
.st-steps { display: grid; gap: 10px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 0 12px; display: grid; gap: 10px; }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -0.01em; padding: 0 14px; font-family: var(--body); font-weight: 600; }
.step h2 span { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 500 12px var(--mono); flex: none; }
.step h2 em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: auto; font-size: 14px; }
.row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 14px 4px; scroll-padding: 0 14px; }
.row::-webkit-scrollbar { display: none; }
.tile, .sw { flex: none; display: grid; gap: 5px; justify-items: center; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.tile img { width: 78px; height: 78px; border-radius: 12px; border: 1px solid var(--line); background: #fff; transition: transform .3s var(--ease); }
.sw span { display: block; width: 62px; height: 62px; border-radius: 12px; background-size: cover; background-position: center; transition: transform .3s var(--ease); }
.tile small, .sw small { font-size: 12px; color: var(--muted); max-width: 80px; text-align: center; line-height: 1.2; }
.tile[aria-pressed="true"] img, .sw[aria-pressed="true"] span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile[aria-pressed="true"] small, .sw[aria-pressed="true"] small { color: var(--ink); font-weight: 600; }
.tile:hover img, .sw:hover span { transform: translateY(-2px); }
.tile:active img, .sw:active span { transform: scale(.94); }
.hint { font-size: 14px; color: var(--muted); padding: 0 14px; }
.hint a { color: var(--accent); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 2px 14px 0; font-size: 15px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background-color .3s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s var(--ease); }
.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; }
.st-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: grid; }
.st-dock .btn { width: 100%; max-width: 520px; justify-self: center; min-height: 54px; }
.sheet { border: 0; padding: 0; width: min(560px, 100%); max-height: 92dvh; margin: auto auto 0; border-radius: 18px 18px 0 0; background: var(--bg); color: var(--ink); overscroll-behavior: contain; }
.sheet::backdrop { background: rgba(10,12,11,.55); }
.sheet-in { padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h3 { font-size: 22px; }
.sheet img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
.used { display: flex; flex-wrap: wrap; gap: 8px; }
.used span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 14px; }
.used i { width: 24px; height: 24px; border-radius: 50%; background-size: cover; }
.btn-col { display: grid; gap: 8px; }
@media (min-width: 900px) {
  .st-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 24px; }
  .st-stage { position: sticky; top: 80px; }
  .st-canvas { max-width: 600px; }
  .sheet { margin: auto; border-radius: 18px; }
}
@media (max-width: 899px) { .st-canvas canvas { width: min(100%, 44svh); margin: 0 auto; } }
