/* صفحة لميس: غرفة القياس */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lamis-head { padding-block: clamp(40px, 6vw, 80px) 8px; display: flex; flex-direction: column; gap: 12px; }
.lamis-head__title { font-size: clamp(64px, 11vw, 150px); line-height: 1; background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }

.lamis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: 24px var(--section); }

/* المسرح */
.lamis__stage { position: sticky; top: 16px; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 5.6; display: grid; place-items: end center;
  background: radial-gradient(520px 420px at 50% 22%, rgba(255,236,206,.9), transparent 70%), linear-gradient(180deg, #E9D6C8, #D8BEB0);
  box-shadow: 0 30px 40px -26px rgba(40,20,20,.7); outline: 2px dashed rgba(162,114,42,.55); outline-offset: -10px; }
.stage__curtain { position: absolute; inset: 0; background:
  repeating-linear-gradient(90deg, rgba(90,35,53,.16) 0 26px, rgba(255,255,255,.08) 26px 52px), linear-gradient(180deg, rgba(90,35,53,.25), transparent 40%); mix-blend-mode: multiply; }
.stage__arch { position: absolute; inset: 7% 12% 8%; border: 2px solid rgba(201,160,74,.65); border-radius: 50% 50% 0 0 / 28% 28% 0 0; box-shadow: inset 0 0 60px rgba(255,255,255,.4); }
.stage__tag { position: absolute; top: 18px; inset-inline-end: 22px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; color: var(--wine); }
.stage__tag span { font-family: var(--latin); letter-spacing: .4em; font-size: 14px; }
.stage__tag small { font-size: 12px; font-weight: 400; color: #6b4a4a; }
.lamis__svg { position: relative; z-index: 2; width: min(100%, 440px); height: 90%; margin-bottom: 8%; overflow: visible; filter: drop-shadow(0 18px 18px rgba(40,20,20,.28)); }
#lamis-figure { transform-origin: 50% 100%; animation: tzbreath 6s ease-in-out infinite; }
@keyframes tzbreath { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(.25deg); } }

.stage__quote { position: absolute; z-index: 4; inset-inline: 22px; bottom: 16px; margin: 0; padding: 12px 18px; border-radius: 18px 18px 18px 4px; background: rgba(252,248,242,.92);
  font-weight: 700; font-size: 15px; color: var(--ink-soft); box-shadow: 0 10px 18px -12px rgba(0,0,0,.5); text-align: center; }
.stage__quote.is-in { animation: tzquote .5s cubic-bezier(.2,.9,.3,1.2); }
@keyframes tzquote { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* منطق العرض */
#lamis-svg .style { display: none; }
#lamis-svg[data-style="abaya"] #s-abaya, #lamis-svg[data-style="mermaid"] #s-mermaid, #lamis-svg[data-style="ball"] #s-ball, #lamis-svg[data-style="midi"] #s-midi { display: inline; }
#lamis-svg .col { fill: var(--c); transition: fill .5s ease; }
#lamis-svg .fab { opacity: 0; transition: opacity .4s ease; }
#lamis-svg[data-fabric="satin"] .fab-satin { opacity: 1; }
#lamis-svg[data-fabric="velvet"] .fab-velvet { opacity: .9; }
#lamis-svg[data-fabric="tiraz"] .fab-tiraz { opacity: 1; }
#lamis-svg[data-fabric="tiraz"] .fab-satin { opacity: .45; }
#lamis-svg[data-fabric="chiffon"] .style { opacity: .84; }
#lamis-svg .trim use { stroke: #E2BE70; stroke-width: 0; transition: stroke-width .35s ease; stroke-linejoin: round; }
#lamis-svg[data-trim="on"] .trim use { stroke-width: 4; }
#hijab { display: none; fill: var(--c); }
#lamis-svg[data-hijab="on"] #hijab { display: inline; }
#lamis-svg[data-hijab="on"] .hair, #lamis-svg[data-hijab="on"] .hair-front { display: none; }
#lamis-svg.dress-in .style { animation: tzdress .7s cubic-bezier(.2,.9,.3,1.1); transform-origin: 200px 160px; }
@keyframes tzdress { 0% { opacity: 0; transform: translateY(-26px) scaleY(.94); } 100% { opacity: 1; transform: none; } }

/* لوحة التحكم */
.lamis__panel { display: flex; flex-direction: column; gap: 30px; }
.opt { border: 0; padding: 0; margin: 0; min-width: 0; }
.opt legend { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 22px; padding: 0; margin-bottom: 16px; }
.opt legend em { font-style: normal; font-size: 16px; color: var(--gold-lo); font-weight: 400; }
.opt__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--gold-hi); font-size: 17px; box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--gold); }
.opt__input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.opt__styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.style-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; cursor: pointer; text-align: center; font-weight: 700; font-size: 14px;
  color: #9d8c7a; background-color: var(--cream); background-image: var(--grain), var(--weave); border-radius: 4px; box-shadow: 0 8px 14px -10px rgba(40,20,10,.5);
  outline: 2px dashed rgba(162,114,42,.45); outline-offset: -6px; transition: transform .3s cubic-bezier(.2,.8,.2,1), color .25s, box-shadow .3s; }
.style-card svg { width: 54px; height: 110px; }
.style-card:hover { transform: translateY(-5px) rotate(-1deg); color: var(--wine); box-shadow: 0 16px 20px -12px rgba(40,20,10,.55); }
.opt__input:checked + .style-card { color: var(--gold-hi); background-color: var(--ink); background-image: var(--grain-dark), var(--weave-dark); outline-color: var(--gold); transform: translateY(-4px); animation: tzpop .45s cubic-bezier(.3,1.6,.5,1); }
.opt__input:focus-visible + .style-card, .opt__input:focus-visible + .spool, .opt__input:focus-visible + .swatch { outline: 3px solid var(--gold-lo); outline-offset: 3px; }

.opt__colors { display: flex; flex-wrap: wrap; gap: 14px; }
.spool { position: relative; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; background:
  repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.18) 0 1px, transparent 1px 4px), var(--sw);
  box-shadow: inset 0 -5px 8px rgba(0,0,0,.28), inset 0 3px 5px rgba(255,255,255,.3), 0 6px 9px -4px rgba(0,0,0,.5);
  transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.spool::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed var(--gold); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.spool:hover { transform: translateY(-4px) rotate(14deg); }
.opt__input:checked + .spool::before { opacity: 1; transform: scale(1); }
.opt__input:checked + .spool { transform: scale(1.08); }

.opt__fabrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { position: relative; display: flex; align-items: flex-end; min-height: 84px; padding: 10px; cursor: pointer; font-weight: 700; font-size: 14px; border-radius: 3px; overflow: hidden; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  box-shadow: 0 8px 14px -10px rgba(40,20,10,.6); transition: transform .3s cubic-bezier(.2,.8,.2,1); outline: 2px dashed rgba(255,255,255,.55); outline-offset: -6px; }
.swatch--satin { background: linear-gradient(120deg, #6b2d42, #b7627c 40%, #5A2335 70%, #a45570); }
.swatch--velvet { background: radial-gradient(circle at 30% 20%, #4a1a2c, #2a0d18); }
.swatch--chiffon { background: linear-gradient(180deg, rgba(235,207,200,.95), rgba(207,164,169,.85)); color: #4a2a30; text-shadow: none; }
.swatch--tiraz { background: #3a1523 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M11 3L19 11L11 19L3 11Z' fill='none' stroke='%23E2BE70' stroke-width='1.2'/%3E%3Ccircle cx='11' cy='11' r='1.6' fill='%23E2BE70'/%3E%3C/svg%3E"); }
.swatch:hover { transform: translateY(-4px) rotate(1deg); }
.opt__input:checked + .swatch { outline: 3px solid var(--gold); outline-offset: -3px; transform: translateY(-3px) scale(1.03); animation: tzpop .45s cubic-bezier(.3,1.6,.5,1); }

.opt__toggles { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.toggle input { position: absolute; opacity: 0; }
.toggle__box { position: relative; width: 52px; height: 28px; border-radius: 28px; background: #d9cbb8; box-shadow: inset 0 2px 4px rgba(0,0,0,.25); transition: background .3s; }
.toggle__box::before { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); box-shadow: 0 2px 4px rgba(0,0,0,.4); transition: inset-inline-start .35s cubic-bezier(.3,1.5,.5,1); }
.toggle__box::after { content: ''; position: absolute; inset: 5px 8px; border-radius: 20px; border: 1.5px dashed rgba(120,84,30,.6); }
.toggle input:checked + .toggle__box { background: var(--wine); }
.toggle input:checked + .toggle__box::before { inset-inline-start: 27px; background: var(--gold-hi); }
.toggle input:focus-visible + .toggle__box { outline: 3px solid var(--gold-lo); outline-offset: 3px; }

.lamis__sum { padding: 24px; background-color: var(--cream); background-image: var(--grain), var(--weave); outline: 2px dashed rgba(162,114,42,.6); outline-offset: -9px; box-shadow: 0 18px 26px -18px rgba(40,20,10,.6); display: flex; flex-direction: column; gap: 14px; }
.lamis__sumtext { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--wine); }

@media (max-width: 900px) {
  .lamis { grid-template-columns: 1fr; }
  .lamis__stage { position: relative; top: 0; max-width: 520px; margin-inline: auto; width: 100%; }
  .opt__styles, .opt__fabrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { #lamis-figure { animation: none; } }

/* ---------- إطلالات لميس بالصور ---------- */
.lamis[hidden] { display: none; }
.lamis-tabs { display: inline-flex; gap: 10px; padding: 6px; margin-top: 16px; border-radius: 50px; background: rgba(120,84,30,.12); }
.lamis-tab { position: relative; padding: 12px 26px; border: 0; border-radius: 40px; cursor: pointer; font: inherit; font-weight: 700; font-size: 16px; color: var(--ink-soft); background: transparent; transition: color .25s, background-color .3s, transform .25s; }
.lamis-tab:hover { transform: translateY(-2px); }
.lamis-tab.is-on { background-color: var(--ink); color: var(--gold-hi); box-shadow: 0 3px 0 var(--gold-lo); outline: 1.5px dashed rgba(226,190,112,.7); outline-offset: -5px; }
.lamis-tab:focus-visible { outline: 3px solid var(--gold-lo); outline-offset: 2px; }

.lamis__stage--photo { aspect-ratio: 1200 / 1490; background: #A9A5A6; place-items: stretch; }
.photo-stack { position: absolute; inset: 0; }
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transform: scale(1.03); transition: opacity .7s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.photo.is-on { opacity: 1; transform: none; }
.lamis__stage--photo .stage__tag { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.lamis__stage--photo .stage__tag small { color: #f1e6d6; }
.lamis__stage--photo .stage__quote { bottom: 20px; }

.look-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.look-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 12px; cursor: pointer; text-align: center; font-weight: 700; font-size: 15px;
  background-color: var(--cream); background-image: var(--grain), var(--weave); border-radius: 3px; box-shadow: 0 8px 14px -10px rgba(40,20,10,.5);
  outline: 2px dashed rgba(162,114,42,.45); outline-offset: -5px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.look-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 2px; }
.look-card:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 16px 20px -12px rgba(40,20,10,.55); }
.opt__input:checked + .look-card { color: var(--gold-hi); background-color: var(--ink); background-image: var(--grain-dark), var(--weave-dark); outline-color: var(--gold); transform: translateY(-4px); animation: tzpop .45s cubic-bezier(.3,1.6,.5,1); }
.opt__input:focus-visible + .look-card { outline: 3px solid var(--gold-lo); outline-offset: 3px; }
.look-soon { display: grid; place-items: center; min-height: 140px; padding: 12px; text-align: center; font-weight: 700; font-size: 14px; color: #9d8c7a; border: 2px dashed rgba(162,114,42,.4); border-radius: 3px; }
.lamis__sumtitle { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3vw, 36px); color: var(--wine); line-height: 1.3; }
.lamis__sumdesc { color: var(--text-2); font-size: 17px; line-height: 1.9; }
@media (max-width: 900px) { .lamis__stage--photo { max-width: 460px; } }
.lamis__stage--photo .stage__quote { inset-inline: auto 16px; bottom: 16px; max-width: 62%; padding: 8px 14px; font-size: 13px; line-height: 1.6; text-align: start; border-radius: 14px 14px 14px 3px; opacity: .94; }
