/* نافذة «غرزة بخطّكِ» */
.stage-col { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.stage-col .lamis__stage { position: relative; top: 0; }
.stitch-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.stitch-cta[hidden] { display: none; }
.stitch-cta small { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .stage-col { position: relative; top: 0; max-width: 460px; margin-inline: auto; width: 100%; } }

.stitch { width: min(1080px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 4px; overflow: hidden; color: var(--ink);
  background-color: var(--cream); background-image: var(--grain), var(--weave); box-shadow: 0 40px 80px -20px rgba(0,0,0,.7); }
.stitch::backdrop { background: rgba(28,15,22,.72); backdrop-filter: blur(3px); }
.stitch[open] { animation: tzdialog .45s cubic-bezier(.2,.9,.3,1.1); }
@keyframes tzdialog { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
.stitch__in { display: flex; flex-direction: column; max-height: 94vh; }
.stitch__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 26px; background: var(--ink); color: var(--gold-hi); }
.stitch__head h2 { font-family: var(--display); font-weight: 700; font-size: 26px; }
.stitch__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--cream); font-size: 26px; line-height: 1; cursor: pointer; transition: transform .3s, background .3s; }
.stitch__close:hover { transform: rotate(90deg); background: rgba(255,255,255,.2); }
.stitch__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 36px; padding: 26px; overflow-y: auto; }
.stitch__ctrl { display: flex; flex-direction: column; gap: 22px; }
.st-step h3, .stitch__prev h3 { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 12px; }
.st-step h3 em, .stitch__prev h3 small { font-style: normal; font-weight: 400; font-size: 15px; color: var(--gold-lo); }
.st-padwrap { position: relative; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(162,114,42,.5), 0 10px 18px -12px rgba(0,0,0,.5); }
#st-pad { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.st-hint { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: #a8987f; font-weight: 700; transition: opacity .3s; text-align: center; padding: 20px; }
.st-btns { display: flex; gap: 10px; margin-top: 10px; }
.st-mini { padding: 8px 18px; border: 0; border-radius: 30px; background: var(--linen-2); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 2px 0 rgba(120,90,40,.4); transition: transform .2s; }
.st-mini:hover { transform: translateY(-2px); }
.st-chips { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.st-chip { display: inline-block; padding: 12px 22px; border-radius: 40px; background: var(--linen-2); font-weight: 700; cursor: pointer; box-shadow: 0 3px 0 rgba(120,90,40,.4); transition: transform .25s, background .25s, color .25s; }
.st-chip:hover { transform: translateY(-3px); }
.opt__input:checked + .st-chip { background: var(--ink); color: var(--gold-hi); box-shadow: 0 3px 0 var(--gold-lo); }
.opt__input:focus-visible + .st-chip { outline: 3px solid var(--gold-lo); outline-offset: 3px; }
.st-range { width: 100%; accent-color: var(--wine); height: 28px; }
.stitch__prev { display: flex; flex-direction: column; gap: 10px; }
#st-scene, #st-full { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 14px 22px -14px rgba(0,0,0,.7); }
.st-full { margin-top: 8px; }
.st-full[hidden] { display: none; }
#st-full { max-width: 300px; }
.stitch__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 26px; border-top: 2px dashed rgba(162,114,42,.4); background: rgba(255,255,255,.4); }
.stitch__foot .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
@media (max-width: 860px) { .stitch__grid { grid-template-columns: 1fr; padding: 18px; } .stitch { width: 100vw; max-height: 100dvh; border-radius: 0; } .stitch__in { max-height: 100dvh; } #st-full { max-width: 240px; } }
