/* Ders sahne görselleri/animasyonları (editci-worker). Renk değişkenleri: --p-sahne --p-gorev --p-kurallar (+ -y yumuşak), --vurgu, --metin, --ikincil, --soluk, --cizgi, --yuzey, --dolgu, --bg.
   Animasyon yalnız @media (prefers-reduced-motion:no-preference) içinde olur; azaltılmış hareketle son kare statik görünür. Mor ve renk geçişi (gradient) yok. */

/* ---- ortak */
.gs{max-width:34rem}
.gs-svg{width:100%;height:auto;display:block;overflow:visible}
.gs-svg text{font-family:Inter,system-ui,sans-serif}
.gs-etiket{font-size:12.5px;font-weight:600;fill:var(--metin)}
.gs-etiket.vurgulu{fill:var(--vurgu)}
.gs-baslik{font-size:11px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;fill:var(--soluk)}
.gs-metin{font-size:11.5px;font-weight:600;fill:var(--metin)}
.gs-kucuk{font-size:11px;font-weight:600;fill:var(--ikincil)}
.gs-parca{font-size:12.5px;font-weight:650;fill:var(--rk,var(--metin))}
.gs-sonuc{font-size:12.5px;font-weight:650;fill:var(--vurgu)}
.gs-kutu{fill:var(--yuzey);stroke:var(--cizgi);stroke-width:1.5}
.gs-kutu.bos{fill:none;stroke-dasharray:5 5}
.gs-kutu.iyi{stroke:var(--p-kurallar)}
.gs-kutu.tutmadi{stroke:var(--vurgu);stroke-width:2}
.gs-cubuk{fill:var(--cizgi)}
.gs-cubuk.soluk{fill:var(--dolgu)}
.gs-cubuk.renkli{fill:var(--rk)}
.gs-ikon{color:var(--ikincil)}
.gs-dolu{fill:var(--yuzey)}
.gs-serit{fill:var(--rk)}
.gs-ok,.gs-don{stroke:var(--soluk);stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.gs-don{stroke-dasharray:4 5}
.gs-isaret circle{fill:var(--yuzey);stroke:var(--cizgi);stroke-width:1.5}
.gs-isaret-yazi{font-size:12.5px;font-weight:700;fill:var(--soluk)}
.gs-isaret.tuttu{color:var(--ikincil)}
.gs-isaret.tuttu circle{stroke:var(--ikincil)}
.gs-isaret.tutmadi{color:var(--vurgu)}
.gs-isaret.tutmadi circle{stroke:var(--vurgu);fill:var(--vurgu-yumusak);stroke-width:2}
.gs-lup{color:var(--vurgu);opacity:0}
.gs-soru-buyuk{font-size:26px;font-weight:700;fill:var(--soluk)}

/* ---- değerlendir */
.gs-degerlendir .gs-kutu.gelen{fill:var(--dolgu)}

/* ---- düzelt */
.gs-sohbet{fill:none;stroke:var(--cizgi);stroke-width:1.2;stroke-dasharray:2 5}
.gs-etiket-kutu{fill:var(--dolgu);stroke:var(--cizgi);stroke-width:1}
.gs-etiket-kutu.iyi{fill:var(--p-kurallar-y);stroke:var(--p-kurallar)}
.gs-balon-yol{fill:var(--yuzey);stroke:var(--vurgu);stroke-width:1.8;stroke-linejoin:round}
.gs-balon.bos .gs-balon-yol{stroke-dasharray:5 5}
.gs-cip-kutu{fill:var(--rb,var(--dolgu));stroke:var(--rk,var(--cizgi));stroke-width:1.5}
.gs-cip.ornek .gs-cip-kutu{fill:none;stroke-dasharray:4 4}
.gs-cip-yazi{font-size:11.5px;font-weight:650;text-anchor:middle;fill:var(--rk,var(--ikincil))}
.gs-cubuk.birlesen{fill:var(--p-kurallar)}
.gs-cubuk.eriyen{opacity:0}

/* ---- ayır */
.gs-seg-kutu{fill:var(--yuzey);stroke:var(--cizgi);stroke-width:1.5}
.gs-seg.gitti{opacity:.35}
.gs-seg.gitti .gs-seg-kutu{fill:none;stroke-dasharray:4 4}
.gs-kova-kutu{fill:var(--rb);stroke:var(--rk);stroke-width:1.5}
.gs-parca-ikon{color:var(--rk)}
.gs-yuva{fill:var(--yuzey);stroke:var(--rk);stroke-width:1.2;stroke-dasharray:4 4;opacity:.8}
.gs-dus-kutu{fill:var(--yuzey);stroke:var(--rk);stroke-width:2}
.gs-isaret.kucuk circle{r:9px}

/* ---- öğret */
.gs-kisi{color:var(--ikincil)}
.gs-kisi.secili{color:var(--vurgu)}
.gs-ampul{color:var(--vurgu)}

/* ---- hareket: yalnız hareket tercihi olan kullanıcıda; son kare yukarıdaki statik hâldir */
@keyframes gs-gir{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes gs-pat{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.18)}to{opacity:1;transform:scale(1)}}
@keyframes gs-tara{0%{opacity:0;transform:translateY(0)}8%{opacity:1}22%{transform:translateY(0)}34%{transform:translateY(52px)}48%{transform:translateY(52px)}60%{transform:translateY(102px)}74%{transform:translateY(102px)}86%{transform:translateY(156px);opacity:1}to{transform:translateY(156px);opacity:0}}
@keyframes gs-nabiz{0%,100%{opacity:1}50%{opacity:.45}}
@keyframes gs-birles{0%{transform:translate(var(--dx),var(--dy));opacity:.6}55%{transform:translate(0,var(--dy));opacity:1}to{transform:none}}
@keyframes gs-eri{0%{transform:translate(var(--dx),var(--dy));opacity:.6}55%{transform:translate(0,var(--dy));opacity:1}to{transform:none;opacity:0}}
@keyframes gs-ayril{from{transform:translateX(var(--kay))}to{transform:none}}
@keyframes gs-dus{from{transform:translate(var(--dx),var(--dy));opacity:.7}to{transform:none;opacity:1}}
@keyframes gs-ciz{from{stroke-dashoffset:60}to{stroke-dashoffset:0}}

@media (prefers-reduced-motion:no-preference){
  .gs-hareket :is(.gs-satir,.gs-kart-g,.gs-balon,.gs-cip,.gs-ok,.gs-don,.gs-ampul,.gs-seg,.gs-dus,.gs-isaret,.gs-lup,.gs-cubuk.birlesen){transform-box:fill-box;transform-origin:center}
  .gs-hareket .gs-satir{animation:gs-gir .4s ease-out both;animation-delay:calc(var(--n,0) * .12s)}
  .gs-hareket .gs-lup{animation:gs-tara 3.4s ease-in-out .6s both;transform-box:view-box;transform-origin:0 0}
  .gs-hareket .gs-isaret.gs-yeni{animation:gs-pat .45s ease-out both}
  .gs-hareket .gs-isaretler .gs-isaret.gs-yeni:nth-child(2){animation-delay:.12s}
  .gs-hareket .gs-isaretler .gs-isaret.gs-yeni:nth-child(3){animation-delay:.24s}
  .gs-hareket .gs-isaretler .gs-isaret.gs-yeni:nth-child(4){animation-delay:.36s}
  .gs-hareket .gs-kart-g,.gs-hareket .gs-balon,.gs-hareket .gs-ok,.gs-hareket .gs-don{animation:gs-gir .45s ease-out both;animation-delay:calc(var(--n,0) * .22s)}
  .gs-hareket .gs-balon.bos .gs-soru-buyuk,.gs-hareket .gs-kart-g.bekliyor .gs-soru-buyuk{animation:gs-nabiz 2.2s ease-in-out 1.4s 3}
  .gs-hareket .gs-cip{animation:gs-pat .45s ease-out both;animation-delay:calc(.3s + var(--n,0) * .25s)}
  .gs-hareket .gs-cubuk.birlesen{transform-box:view-box;transform-origin:0 0;animation:gs-birles 1.5s ease-in-out both;animation-delay:calc(1.2s + var(--n,0) * .06s)}
  .gs-hareket .gs-cubuk.eriyen{animation-name:gs-eri}
  .gs-hareket .gs-ampul{animation:gs-pat .5s ease-out 1.5s both}
  .gs-hareket .gs-seg{transform-box:view-box;transform-origin:0 0;animation:gs-ayril .6s ease-out .5s both}
  .gs-hareket .gs-seg.gitti{transition:opacity .4s}
  .gs-hareket .gs-dus.gs-anim{transform-box:view-box;transform-origin:0 0;animation:gs-dus .6s cubic-bezier(.3,.7,.4,1) both}
  .gs-hareket .gs-dus.gs-anim~.gs-isaret{animation-delay:.5s}
  .gs-hareket .gs-bol{stroke-dasharray:60;animation:gs-ciz .6s ease-out .9s both}
  .gs-acilis.gs-hareket .gs-satir,.gs-acilis.gs-hareket .gs-kart-g:not(.yeni),.gs-acilis.gs-hareket .gs-ok,.gs-acilis.gs-hareket .gs-don{animation:none}

  /* dunya: mevcut akış SVG'si (gorsel.js) yalnız CSS ile: mesaj sen, kart, okuyan, sonuç boyunca yürür */
  @keyframes gs-akis-kutu{0%,100%{stroke:var(--cizgi);stroke-width:1.5}30%,60%{stroke:var(--vurgu);stroke-width:2.5}}
  @keyframes gs-akis-ok{0%{opacity:.25;transform:translateX(-6px)}50%{opacity:1;transform:translateX(3px)}to{opacity:1;transform:none}}
  .ders-gorsel .gorsel-akis rect.gorsel-kutu{animation:gs-akis-kutu 1s ease-in-out both}
  .ders-gorsel .gorsel-akis rect.gorsel-kutu:nth-of-type(2){animation-delay:.7s}
  .ders-gorsel .gorsel-akis rect.gorsel-kutu:nth-of-type(3){animation-delay:1.4s}
  .ders-gorsel .gorsel-akis rect.gorsel-kutu:nth-of-type(4){animation-delay:2.1s}
  .ders-gorsel .gorsel-akis>g:not(.gorsel-ikon){transform-box:fill-box;animation:gs-akis-ok .6s ease-out both}
  .ders-gorsel .gorsel-akis>g:nth-of-type(5){animation-delay:.45s}
  .ders-gorsel .gorsel-akis>g:nth-of-type(6){animation-delay:1.15s}
  .ders-gorsel .gorsel-akis>g:nth-of-type(7){animation-delay:1.85s}

  /* yol: duraklar sırayla yanar (her durak: düğüm daire + rozet daire; düğümler tek sıralı daireler) */
  @keyframes gs-durak{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:none}}
  @keyframes gs-yol-dol{from{stroke-dasharray:0 1000}to{stroke-dasharray:1000 0}}
  .ders-gorsel .gorsel-yol circle,.ders-gorsel .gorsel-yol>g,.ders-gorsel .gorsel-yol text{transform-box:fill-box;transform-origin:center;animation:gs-durak .4s ease-out both}
  .ders-gorsel .gorsel-yol .gorsel-yol-dolu{animation:gs-yol-dol 1.6s ease-in-out .3s both}
  .ders-gorsel .gorsel-yol :is(circle:nth-of-type(1),circle:nth-of-type(2),g:nth-of-type(1),text:nth-of-type(1),text:nth-of-type(2)){animation-delay:.1s}
  .ders-gorsel .gorsel-yol :is(circle:nth-of-type(3),circle:nth-of-type(4),g:nth-of-type(2),text:nth-of-type(3),text:nth-of-type(4)){animation-delay:.3s}
  .ders-gorsel .gorsel-yol :is(circle:nth-of-type(5),circle:nth-of-type(6),g:nth-of-type(3),text:nth-of-type(5),text:nth-of-type(6)){animation-delay:.5s}
  .ders-gorsel .gorsel-yol :is(circle:nth-of-type(7),circle:nth-of-type(8),g:nth-of-type(4),text:nth-of-type(7),text:nth-of-type(8)){animation-delay:.7s}
  .ders-gorsel .gorsel-yol :is(circle:nth-of-type(9),circle:nth-of-type(10),g:nth-of-type(5),text:nth-of-type(9),text:nth-of-type(10)){animation-delay:.9s}
  .ders-gorsel .gorsel-yol :is(circle:nth-of-type(11),circle:nth-of-type(12),g:nth-of-type(6),text:nth-of-type(11),text:nth-of-type(12)){animation-delay:1.1s}
}

.gs.gs-erisim{max-width:42rem;width:100%;margin:0 auto;color:var(--metin)}
.gs-erisim-yollar,.gs-erisim-bag{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.gs-erisim-yol{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 6px;min-height:70px;border:1px solid var(--cizgi);border-radius:12px;background:var(--yuzey);text-align:center;font-size:.85rem;line-height:1.3}
.gs-erisim-yol .ui-ikon{width:26px;height:26px;color:var(--vurgu)}
.gs-erisim-ok{text-align:center;font-size:1.25rem;line-height:1.2;color:var(--soluk);padding:2px}
.gs-erisim-hesap{display:flex;align-items:center;justify-content:center;gap:14px;padding:10px;border:1px solid var(--vurgu);border-radius:12px;background:var(--vurgu-yumusak);font-size:.95rem}
.gs-erisim-hesap span{font-size:.85rem}
.gs-erisim-son{text-align:center;padding:10px;border:1px solid var(--cizgi);border-radius:12px;background:var(--yuzey);font-size:.85rem}
