/* Nasıl çalışır – kuşbakışı depo haritası */
.pmw { container: pm / inline-size; margin: 8px 0 32px; }
.pm { position: relative; height: 240vh; }
.pm__sticky { position: sticky; top: 96px; display: grid; gap: 16px; align-items: center; padding: 16px; border-radius: 26px; background: linear-gradient(180deg, #eef2f7, #e3e9f0); border: 1px solid #dde4ec; overflow: hidden; }
.pm__map svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 150px); }
.pm-track { fill: none; stroke: #cbd5e1; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.pm-track--back { stroke-dasharray: 2 10; stroke-width: 4; }
.pm-route { fill: none; stroke: var(--a500); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.pm-route--back { stroke: #16a34a; stroke-width: 5; }
.pm-stop__c { fill: #64748b; stroke: #fff; stroke-width: 3; transition: fill .3s; }
.pm-stop.is-on .pm-stop__c { fill: var(--p900); }
.pm-stop.is-done .pm-stop__c { fill: var(--a500); }
.pm-stop[data-pm-stop="4"].is-done .pm-stop__c { fill: #16a34a; }
.pm-mark { fill: var(--p900); stroke: #fff; stroke-width: 3; filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .35)); }
[data-pm-room] { transition: fill .4s, stroke .4s; }
[data-pm-room].is-filled { fill: rgba(var(--a-rgb), .12); stroke: var(--a500); }

/* Gösterge paneli (SCA tarzı) */
.pm__hud { display: grid; gap: 10px; }
.pm-dial { position: relative; width: 132px; height: 132px; margin: 0 auto; border-radius: 50%; background: rgba(100, 116, 139, .55); backdrop-filter: blur(8px); display: grid; place-items: center; align-content: center; color: #fff; text-align: center; }
.pm-dial svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
.pm-dial__bg { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: 6; }
.pm-dial__arc { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); transform-origin: 60px 60px; }
.pm-dial__tick { stroke: rgba(255, 255, 255, .45); stroke-width: 2; stroke-linecap: round; }
.pm-dial__k { position: relative; font-size: .78rem; font-weight: 700; }
.pm-dial b { position: relative; font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.pm-dial small { position: relative; font-size: .78rem; opacity: .85; }
.pmw .pm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pmw .pm-step { margin: 0; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 99px; background: rgba(100, 116, 139, .5); backdrop-filter: blur(8px); color: #fff; opacity: .72; transition: opacity .3s, background .3s, transform .3s; }
.pmw .pm-step::before { display: none; }
.pmw .pm-step.is-on { opacity: 1; background: var(--p900); transform: translateX(-4px); }
.pmw .pm-step.is-done { opacity: 1; background: rgba(71, 85, 105, .72); }
.pm-step__ico { position: relative; flex: 0 0 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--p800); }
.pm-step__ico .ued-ico { width: 22px; height: 22px; }
.pm-step__ico em { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%) scale(0); padding: 1px 6px; border-radius: 99px; background: #84cc16; color: #fff; font-style: normal; font-size: .56rem; font-weight: 800; letter-spacing: .04em; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pm-step.is-done .pm-step__ico em { transform: translateX(-50%) scale(1); }
.pm-step.is-on .pm-step__ico { color: var(--a600); box-shadow: 0 0 0 4px rgba(var(--a-rgb), .35); }
.pm-step__t b { display: block; font-family: var(--display); font-size: .98rem; line-height: 1.2; }
.pm-step__t small { display: block; font-size: .74rem; opacity: .85; }

@container pm (min-width: 820px) {
  .pm__sticky { grid-template-columns: minmax(0, 1fr) 270px; padding: 20px; }
}
@container pm (min-width: 560px) and (max-width: 819px) {
  .pm__hud { grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
  .pm-dial { width: 112px; height: 112px; }
}
@container pm (max-width: 559px) {
  .pm-dial { display: none; }
  .pm__hud { grid-template-columns: 1fr 1fr; }
  .pmw .pm-step { padding: 6px 10px 6px 6px; gap: 8px; }
  .pm-step__ico { flex-basis: 36px; height: 36px; }
  .pm-step__t b { font-size: .8rem; }
  .pm-step__t small { display: none; }
}
.pm.is-static { height: auto; }
.pm.is-static .pm__sticky { position: relative; top: 0; }
@media (prefers-reduced-motion: reduce) { .pm-step, .pm-step__ico em { transition: none; } }

/* Odaya yakınlaşınca depo içi sahne */
.pm__stage { position: relative; overflow: hidden; border-radius: 18px; }
.pm__map { will-change: transform, opacity; }
.pm__scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #f4f6f9, #e6ebf1); will-change: transform, opacity; }
.pm__inner, .pm__hx { position: absolute; inset: 0; }
.pm__hx svg { display: block; width: 100%; height: 100%; }
.pm__badge { position: absolute; left: 14px; top: 14px; margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(15, 23, 42, .82); color: #fff; font-size: .78rem; font-weight: 700; }
.pm__badge span { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .3); }

/* v2: tam genişlik, panel haritanın üstünde */
.pmw { margin-left: auto; margin-right: auto; }
.pm__sticky { top: 88px; padding: 12px; }
.pm__map svg { max-height: calc(100vh - 120px); }
@container pm (min-width: 820px) {
  .pm__sticky { grid-template-columns: 1fr; padding: 14px; }
  .pm__hud { position: absolute; z-index: 3; top: 28px; right: 28px; width: 290px; }
  .pm-dial { margin: 0 0 0 auto; }
}

/* v3: tam ekran (hero sahnesi gibi) */
.pmw { width: 100%; max-width: none; margin: 0; }
.pm { height: 300vh; }
.pm__sticky { top: 0; height: 100vh; height: 100svh; padding: 104px 18px 18px; border: 0; border-radius: 0; background: #e9eef4; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.pm__stage { height: 100%; border-radius: 22px; background: #e9eef4; }
.pm__map, .pm__map svg { width: 100%; height: 100%; max-height: none; }
@container pm (min-width: 820px) {
  .pm__sticky { grid-template-columns: 1fr; padding: 104px 24px 24px; }
  .pm__hud { top: 128px; right: 48px; width: 300px; }
}
@container pm (max-width: 819px) {
  .pm__sticky { grid-template-rows: minmax(0, 1fr) auto; padding: 96px 10px 10px; }
}
.pm.is-test .pm__sticky { position: fixed; inset: 0; z-index: 50; }
body:has(.pm.is-test) .sh:not(.is-stuck) .sh__util { color: var(--p800); }

/* v4: sayfa başlığı yerine tam ekran */
.pm__sticky { background: #e9eef4; }
.pm__title { position: absolute; z-index: 3; left: 44px; top: 128px; max-width: 360px; padding: 16px 20px; border-radius: 20px; background: rgba(15, 23, 42, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .6); }
.pm__title p { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--a400); }
.pm__title p span { width: 8px; height: 8px; border-radius: 50%; background: var(--a500); box-shadow: 0 0 0 3px rgba(var(--a-rgb), .3); }
.pm__title h1 { margin: 0; font-family: var(--display); font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.2; color: #fff; }
.pm__title small { display: block; margin-top: 6px; font-size: .78rem; color: #cbd5e1; }
@container pm (max-width: 819px) {
  .pm__title { position: relative; left: auto; top: auto; max-width: none; padding: 10px 14px; border-radius: 14px; }
  .pm__title small { display: none; }
  .pm__sticky { grid-template-rows: auto minmax(0, 1fr) auto; }
}
body:has(.pm) .sh:not(.is-stuck) .sh__util { color: var(--p800); text-shadow: none; }
body:has(.pm) .sh:not(.is-stuck) .sh__util .ued-ico { color: var(--a600); }

/* v5: daha uzun süreç, sade başlık kartı */
.pm { height: 460vh; }
.pm__title { left: max(24px, calc((100vw - 1440px) / 2 + 24px)); top: 168px; max-width: 380px; padding: 20px 24px; border-radius: 20px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--p900); border: 1px solid #e2e8f0; box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .45); will-change: opacity, transform; }
.pm__title p { color: var(--a600); }
.pm__title h1 { color: var(--p900); font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.12; }
.pm__title small { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #475569; font-size: .82rem; }
.pm__title small::before { content: ""; flex: 0 0 14px; height: 20px; border: 2px solid currentColor; border-radius: 8px; box-sizing: border-box; background: linear-gradient(var(--a500), var(--a500)) center 4px / 2px 5px no-repeat; }
@container pm (max-width: 819px) { .pm__title { left: auto; top: auto; max-width: none; padding: 12px 16px; } .pm__title h1 { font-size: 1.25rem; } .pm__title small { display: none; } }

/* v6: mobil – harita ekranı doldurur, adımlar alt şerit, başlık üstte küçük */
@container pm (max-width: 819px) {
  .pm__sticky { display: block; padding: 0; }
  .pm__stage { position: absolute; inset: 0; border-radius: 0; }
  .pm__map svg { width: 100%; height: 100%; }
  .pm__title { position: absolute; z-index: 4; top: 124px; left: 12px; right: 12px; padding: 10px 14px; border-radius: 14px; }
  .pm__title p { margin-bottom: 2px; font-size: .64rem; }
  .pm__title h1 { font-size: 1.1rem; }
  .pm__hud { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 78px; top: auto; width: auto; display: block; }
  .pm-dial { display: none; }
  .pmw .pm-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 8px; border-radius: 18px; background: rgba(15, 23, 42, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .pmw .pm-step, .pmw .pm-step.is-on, .pmw .pm-step.is-done { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 4px 2px; border-radius: 12px; background: transparent; transform: none; text-align: center; }
  .pmw .pm-step.is-on { background: rgba(255, 255, 255, .1); }
  .pm-step__ico { flex: 0 0 auto; width: 38px; height: 38px; }
  .pm-step__ico .ued-ico { width: 18px; height: 18px; }
  .pm-step__t b { font-size: .66rem; line-height: 1.2; font-weight: 700; }
  .pm-step__t small { display: none; }
  .pm__badge { top: auto; bottom: 186px; left: 12px; }
}

/* v7: harita çerçevesiz, tüm ekran */
@container pm (min-width: 820px) {
  .pm__sticky { padding: 0; }
  .pm__stage { border-radius: 0; }
}
.pm__sticky, .pm__stage { background: #e8edf3; }
.pm-track { stroke: #cfd6de; }

/* v8: hikâye – ev, yolculuk, kilitler */
.pm { height: 560vh; }
.pm-track--in { stroke-dasharray: 2 8; stroke-width: 4; }
.pm-route--in { stroke-width: 4; stroke-dasharray: 3000; }
.pm-lock { transition: opacity .25s; }
.pm-lock__bg { fill: #dc2626; stroke: #fff; stroke-width: 3; filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .3)); transition: fill .25s; }
.pm-lock__kh { fill: #dc2626; transition: fill .25s; }
.pm-lock__sh { transition: transform .25s; }
.pm-lock.is-open .pm-lock__bg, .pm-lock.is-open .pm-lock__kh { fill: #16a34a; }
.pm-lock.is-open .pm-lock__sh { transform: translate(4px, -3px) rotate(18deg); transform-box: fill-box; transform-origin: 0% 100%; }
[data-pm-gate] { transition: none; }

/* v9: evin önünde yandan yükleme sahnesi */
.pm__load { position: absolute; inset: 0; opacity: 0; visibility: hidden; overflow: hidden; background: linear-gradient(180deg, #f4f6f9, #e6ebf1); will-change: opacity, transform; }
.pm__loadsvg, .pm__loadsvg svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@container pm (min-width: 820px) { .pm__load .pm__badge { top: 150px; left: 24px; } }

/* v10: başlık kartı yok; canlı açıklama + detaylı adım kartları */
.pm__cap { position: absolute; z-index: 4; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); margin: 0; padding: 14px 22px; border-radius: 18px; background: rgba(15, 23, 42, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; text-align: center; box-shadow: 0 20px 40px -20px rgba(15, 23, 42, .6); }
.pm__cap span { display: block; font-family: var(--display); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--a400); }
.pm__cap b { display: block; margin-top: 3px; font-size: 1.02rem; font-weight: 600; line-height: 1.4; }
.pm__cap.is-new b { animation: pmCap .45s ease both; }
@keyframes pmCap { from { opacity: 0; transform: translateY(6px); } }
.pmw .pm-step__more { display: none; list-style: none; margin: 6px 0 2px; padding: 0; }
.pmw .pm-step__more li { position: relative; margin: 3px 0 0; padding-left: 14px; font-size: .78rem; line-height: 1.35; color: #dbe3ec; }
.pmw .pm-step__more li::before { content: ""; position: absolute; left: 0; top: .45em; width: 6px; height: 6px; border-radius: 50%; background: var(--a400); }
.pmw .pm-step.is-on { border-radius: 26px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.pmw .pm-step.is-on .pm-step__more { display: block; }
@container pm (max-width: 819px) {
  .pm__cap { bottom: 172px; padding: 10px 14px; }
  .pm__cap b { font-size: .84rem; }
  .pmw .pm-step.is-on .pm-step__more { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pm__cap.is-new b { animation: none; } }
@container pm (min-width: 820px) { .pm__scene .pm__badge { top: 150px; left: 24px; } }

/* v11: kısa adım kartları */
.pmw .pm-step.is-on .pm-step__more { display: none !important; }
.pmw .pm-step.is-on { border-radius: 99px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
[data-pm-roof] { will-change: opacity; }

/* v12: açıklama kutusu yarı saydam (arka plan görünsün) */
.pm__cap { background: rgba(58, 44, 30, .38); -webkit-backdrop-filter: blur(3px) sepia(.35) saturate(1.1); backdrop-filter: blur(3px) sepia(.35) saturate(1.1); border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 16px 34px -22px rgba(15, 23, 42, .55); }
.pm__cap b { text-shadow: 0 1px 6px rgba(15, 23, 42, .6); }
.pm__cap span { color: #ffd7a8; text-shadow: 0 1px 4px rgba(15, 23, 42, .5); }

/* v13: açıklama kutusu adım kartlarıyla aynı + fare ikonu */
.pm__cap { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; text-align: left; background: rgba(100, 116, 139, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 0; border-radius: 22px; padding: 12px 22px 12px 16px; }
.pm__cap span { grid-column: 2; color: #fff; opacity: .9; text-shadow: none; }
.pm__cap b { grid-column: 2; text-shadow: none; }
.pm__mouse { grid-row: 1 / span 2; position: relative; width: 26px; height: 40px; border: 2.5px solid #fff; border-radius: 14px; }
.pm__mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: pmWheel 1.6s ease-in-out infinite; }
@keyframes pmWheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .pm__mouse::after { animation: none; } }
@container pm (max-width: 819px) { .pm__mouse { width: 20px; height: 32px; } }
