/* yasam.css — Günlük yaşam ve duygular (Adım 5, js/yasam.js). Resimler Sare'nin; çizilmiş şekil yok. */

/* Bu oyunlar yalnız krallıktan açılır: menü yeniden çizilirse kartları görünmesin */
.game-card[data-game^="yasam-"] { display: none !important; }

.ys-yuzey { align-items: center; justify-content: center; overflow: hidden; }
.ys-sahne, .tur-sahne.ys-soru {
    position: relative; width: 100%; flex: 1 1 auto; border-radius: 26px; overflow: hidden;
    background: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3)), url('../assets/img/ogrenme/bg/banyo.webp') center / cover;
}
.tur-sahne.ys-soru { padding: 16px; }
.ys-soru .st-secenek .st-emoji { font-size: clamp(48px, 7vw, 72px); }
.ys-gun .st-secenek { width: clamp(150px, 24vw, 250px); aspect-ratio: 16 / 9; height: auto; padding: 6px; }
.ys-gun .st-secenek img { border-radius: 18px; object-fit: cover; }
.ys-durum { display: grid; place-items: center; margin-bottom: 14px; }
.ys-durum img {
    width: min(58vw, 460px); max-height: 34vh; object-fit: cover; border-radius: 26px;
    box-shadow: 0 10px 0 rgba(255, 255, 255, .8), 0 16px 30px rgba(120, 60, 110, .2); animation: ny-otur .5s cubic-bezier(.3, 1.4, .5, 1);
}

/* ---------------------------------------------------------------- diş fırçalama */
.ys-banyo { touch-action: none; cursor: none; display: grid; place-items: center; }
.ys-aygir { position: relative; height: min(78%, 62vw); aspect-ratio: 264 / 319; }
.ys-aygir > img:first-child { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ys-aygir.parliyor > img:first-child { animation: ys-parla 1s ease-in-out 2; }
.ys-mikrop {
    --olcek: 1; position: absolute; width: 17%; transform: translate(-50%, -50%) scale(var(--olcek)); pointer-events: none;
    animation: ys-gel .5s cubic-bezier(.3, 1.6, .5, 1) backwards; transition: transform .15s;
}
.ys-mikrop.sallan { animation: ys-titre .25s; }
.ys-mikrop.kacti { animation: ys-kac .8s ease-in forwards; }
.ys-kum { position: absolute; top: 4%; right: 4%; width: clamp(64px, 11vw, 110px); pointer-events: none; }
.ys-kum.akiyor { animation: ys-cevir linear infinite; animation-direction: normal; }
.ys-firca {
    position: absolute; left: 70%; top: 70%; width: clamp(90px, 15vw, 150px); pointer-events: none; z-index: 2;
    transform: translate(-70%, -22%) rotate(-20deg); transition: left .04s, top .04s;
}
.ys-firca:not(.tutuldu) { animation: ys-salin 1.6s ease-in-out infinite; }
.ys-firca.salla { animation: ys-salin .5s ease-in-out infinite; }

@keyframes ys-gel { from { transform: translate(-50%, -50%) scale(0); } }
@keyframes ys-titre { 50% { transform: translate(-50%, -50%) scale(var(--olcek)) rotate(14deg); } }
@keyframes ys-kac { to { transform: translate(120%, -260%) scale(.2) rotate(240deg); opacity: 0; } }
@keyframes ys-cevir { 0%, 92% { transform: rotate(0); } 100% { transform: rotate(180deg); } }
@keyframes ys-salin { 0%, 100% { transform: translate(-70%, -22%) rotate(-20deg); } 50% { transform: translate(-70%, -34%) rotate(-12deg); } }
@keyframes ys-parla { 50% { filter: brightness(1.15) drop-shadow(0 0 22px rgba(255, 255, 255, .95)); } }

/* ---------------------------------------------------------------- trafik ışığı (yaya geçidi) */
/* Sahne resmin en-boy oranında: konumlar (resmin yüzdesi) her ekranda aynı yere düşer */
.ys-sokak2 { display: grid; place-items: center; background: #CFE7F5; }
.ys-cadde { position: relative; aspect-ratio: 1376 / 768; width: min(100%, calc((100cqh) * 1.79)); max-height: 100%;
    background: url('../assets/img/ogrenme/bg/yaya-gecidi.webp') center / 100% 100%; border-radius: 22px; overflow: hidden; }
.ys-sokak2 { container-type: size; }
.ys-sokak2 .ys-isik { position: absolute; left: 4%; right: auto; top: 14%; height: 56%; aspect-ratio: 170 / 328; cursor: pointer; z-index: 90; transform-origin: 50% 100%; }
.ys-sokak2 .ys-isik.basildi { animation: ys-bas .35s ease-out; }
.ys-sokak2 .ys-isik.degisti .ys-yanik { animation: ys-yan .4s ease-out; }
.ys-sokak2 .ys-isik.parla { animation: mat-parla 1s ease-in-out infinite; }
@keyframes ys-bas { 40% { transform: scale(.94, .9); } 75% { transform: scale(1.03, 1.04); } }
@keyframes ys-yan { from { filter: brightness(1.8); } }
.ys-isik img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
/* Yanan lamba: trafik ışığı resminin o lambası parlatılmış sürümü (tools/isik-yap.py); çizilmiş ışık yok */
.ys-isik img.ys-yanik { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; }
.ys-isik[data-renk="kirmizi"] .ys-yanik.kirmizi, .ys-isik[data-renk="sari"] .ys-yanik.sari, .ys-isik[data-renk="yesil"] .ys-yanik.yesil { opacity: 1; }
.ys-isik[data-renk="kirmizi"] > img:first-child, .ys-isik[data-renk="sari"] > img:first-child, .ys-isik[data-renk="yesil"] > img:first-child { opacity: 0; }
/* Pamuk (yaya): ayakları verilen noktada; Duygular oyunundaki .ys-pamuk'tan ayrı sınıf */
.ys-yaya { position: absolute; aspect-ratio: 1; transform: translate(-50%, -100%); cursor: pointer; touch-action: manipulation; }
.ys-yaya-resim { height: 100%; width: 100%; object-fit: contain; object-position: 50% 100%; display: block; transform-origin: 50% 100%;
    filter: drop-shadow(0 8px 10px rgba(60, 40, 80, .28)); pointer-events: none; }
.ys-yaya.geldi .ys-yaya-resim { animation: ys-yaya-gel .7s cubic-bezier(.3, 1.5, .5, 1); }
.ys-yaya.salla .ys-yaya-resim { animation: st-salla .45s; }
.ys-yaya.parla .ys-yaya-resim { animation: mat-parla 1s ease-in-out infinite; }
.ys-yaya.bak .ys-yaya-resim { animation: ys-bak 1.35s ease-in-out; }
.ys-yaya.yuru .ys-yaya-resim { animation: ys-hopla .33s ease-in-out infinite; }
.ys-yaya.sevindi .ys-yaya-resim { animation: ys-sevin .55s cubic-bezier(.3, 1.5, .5, 1) 2; }
@keyframes ys-yaya-gel { from { transform: translateX(-160%) rotate(-8deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes ys-bak { 0%, 100% { transform: none; } 20%, 40% { transform: scaleX(-1) rotate(-4deg); } 60%, 85% { transform: rotate(5deg); } }
@keyframes ys-hopla { 50% { transform: translateY(-9%) scale(.97, 1.03); } }
@keyframes ys-sevin { 45% { transform: translateY(-22%) scale(1.05, .95); } 80% { transform: scale(.96, 1.04); } }
.ys-araba { position: absolute; transform: translate(-50%, -100%) scaleX(var(--ayna, 1)); pointer-events: none;
    filter: drop-shadow(0 8px 6px rgba(40, 30, 50, .3)); animation: ys-araba-titre .35s ease-in-out infinite; }
.ys-araba.duruyor { animation: none; }
@keyframes ys-araba-titre { 50% { translate: 0 -1.5%; } }

/* ---------------------------------------------------------------- Pamuk'a iyi bak (duygular oyuncağı) */
.ys-pamukevi, .ys-gunevi { position: relative; width: 100%; flex: 1 1 auto; border-radius: 26px; overflow: hidden; }
.ys-pamukevi { background: url('../assets/img/ogrenme/bg/cocuk-odasi.webp') center / cover; }
.ys-alan { position: absolute; inset: 0; overflow: hidden; border-radius: 26px; touch-action: none; transition: filter 1.2s; }
.ys-alan button { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ys-alan img { pointer-events: none; user-select: none; }
.ys-alan.gece { filter: brightness(.55) saturate(.8); }
.ys-durum-kart { position: absolute; left: 4%; top: 6%; width: 30%; border-radius: 22px; overflow: hidden; border: 5px solid #fff;
    box-shadow: 0 10px 22px rgba(80, 40, 90, .25); transform: rotate(-4deg); transition: opacity .4s; }
.ys-durum-kart img { width: 100%; display: block; }
.ys-durum-kart.bos { opacity: 0; }
.ys-durum-kart.gel { animation: ys-kart-gel .6s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes ys-kart-gel { from { transform: rotate(-30deg) scale(.3); opacity: 0; } }
.ys-pamuk { position: absolute; left: 58%; top: 46%; height: 52%; transform: translate(-50%, -50%); cursor: pointer; touch-action: none; }
.ys-pamuk-resim { height: 100%; display: block; filter: drop-shadow(0 12px 14px rgba(80, 40, 90, .3)); transform-origin: 50% 100%; }
.ys-ortu { position: absolute; left: -8%; bottom: -8%; width: 116%; opacity: 0; transform: translateY(-80%) scale(.6); transition: opacity .5s, transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.ys-pamuk.ortulu .ys-ortu { opacity: 1; transform: none; }
.ys-pamuk.gel .ys-pamuk-resim { animation: ys-gel .6s cubic-bezier(.3, 1.5, .5, 1); }
.ys-pamuk.titrek .ys-pamuk-resim { animation: ys-titre .16s linear infinite; }
.ys-pamuk.kizgin .ys-pamuk-resim { animation: ys-kizgin .9s ease-in-out infinite; }
.ys-pamuk.esniyor .ys-pamuk-resim { animation: ys-esne 2.6s ease-in-out infinite; }
.ys-pamuk.sariliyor .ys-pamuk-resim { animation: ys-saril 1.6s ease-in-out infinite; }
.ys-pamuk.zipla .ys-pamuk-resim { animation: ys-zipla .5s ease-out; }
.ys-pamuk.cagir .ys-pamuk-resim { animation: ys-zipla .5s ease-out 2; }
.ys-pamuk.mutlandi .ys-pamuk-resim { animation: ys-mutlu 1s cubic-bezier(.3, 1.5, .5, 1); }
.ys-pamuk.uyudu .ys-pamuk-resim { animation: ys-esne 3.4s ease-in-out infinite; }
@keyframes ys-gel { from { transform: scale(.4) translateY(30%); opacity: 0; } }
@keyframes ys-titre { 50% { transform: translateX(2%) rotate(1deg); } }
@keyframes ys-kizgin { 50% { transform: scale(1.04, .96); filter: drop-shadow(0 0 12px rgba(255, 80, 60, .6)); } }
@keyframes ys-esne { 50% { transform: scale(1.03, .96) rotate(-3deg); } }
@keyframes ys-saril { 50% { transform: scale(1.08, .94); } }
@keyframes ys-zipla { 40% { transform: translateY(-18%) scale(1.05, .95); } 70% { transform: translateY(0) scale(.96, 1.05); } }
@keyframes ys-mutlu { 0% { transform: scale(.8); } 35% { transform: translateY(-20%) rotate(-10deg) scale(1.1); } 60% { transform: translateY(0) rotate(8deg); } 80% { transform: translateY(-6%) rotate(-3deg); } }
.ys-esya { height: 17%; aspect-ratio: 1; transform: translate(-50%, -50%); touch-action: none; transition: left .45s ease, top .45s ease, transform .3s, opacity .3s; }
.ys-esya img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(80, 40, 60, .3)); }
.ys-esya.tasiniyor { transition: none; transform: translate(-50%, -50%) scale(1.15); z-index: 5; }
.ys-esya.kucakta { transform: translate(-50%, -50%) scale(.75); z-index: 4; }
.ys-esya.zipla img { animation: ys-zipla .45s ease-out; }
.ys-esya.parla img { animation: ys-parla 1s ease-in-out infinite; }
@keyframes ys-parla { 50% { filter: drop-shadow(0 0 16px #ffe27a) drop-shadow(0 0 6px #fff); transform: scale(1.1); } }

/* ---------------------------------------------------------------- Pamuk'un günü: güneşi gökte sürükle */
.ys-gun-sahne { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.ys-gun-sahne.acik { opacity: 1; }
.ys-gok-cisim { width: clamp(80px, 15vh, 130px); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 3; touch-action: none; cursor: grab; }
.ys-gok-cisim.suzul { transition: left .6s ease, top .6s ease; }
.ys-gok-cisim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .6s, transform .6s; }
.ys-gunes { filter: drop-shadow(0 0 22px rgba(255, 210, 60, .9)); animation: ys-don 12s linear infinite; }
.ys-ay { opacity: 0; transform: scale(.5) rotate(-40deg); filter: drop-shadow(0 0 18px rgba(200, 220, 255, .9)); }
.ys-gok-cisim.ay-oldu .ys-gunes { opacity: 0; }
.ys-gok-cisim.ay-oldu .ys-ay { opacity: 1; transform: none; }
.ys-gok-cisim.tasiniyor { cursor: grabbing; }
.ys-gok-cisim.tasiniyor img { scale: 1.12; }
.ys-gok-cisim.parla-bir img { animation: ys-zipla .5s ease-out; }
@keyframes ys-don { to { rotate: 360deg; } }

/* ---------------------------------------------------------------- Adım 5 ek (js/yasam-ek.js): sıralama, neden-sonuç, güvenli ev */
.ye-sira { background: linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)), url('../assets/img/ogrenme/bg/cicek-bahcesi.webp') center / cover; }
.ye-yuvalar { position: absolute; left: 3%; right: 3%; top: 6%; height: 50%; display: flex; align-items: center; justify-content: center; gap: 1.5%; }
.ye-yuva { position: relative; height: 100%; aspect-ratio: 1; max-width: 30%; border-radius: 24px; border: 4px dashed #fff; background: rgba(255, 255, 255, .55);
    box-shadow: 0 6px 14px rgba(60, 90, 40, .18); display: grid; place-items: center; transition: transform .25s, border-color .25s; }
.ye-yuva.sirada { border-color: #FFC83D; transform: scale(1.04); }
.ye-yuva.dolu { border-style: solid; border-color: #6CC24A; background: #fff; }
.ye-yuva.salla { animation: b8-salla .45s; }
.ye-yuva.oturdu { animation: ye-otur .4s cubic-bezier(.3, 1.6, .5, 1); }
.ye-yuva.oyna { animation: ye-oyna .8s ease-in-out; }
.ye-nokta { position: absolute; left: 0; right: 0; bottom: -2px; transform: translateY(100%); text-align: center; color: #6CC24A; font-size: clamp(14px, 2.6vh, 24px); letter-spacing: 2px; }
.ye-yuva-resim { width: 92%; height: 92%; object-fit: contain; border-radius: 18px; }
.ye-ok { color: #fff; font-size: clamp(24px, 5vh, 46px); text-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.ye-masa { position: absolute; left: 4%; right: 4%; bottom: 3%; height: 34%; background: rgba(255, 250, 242, .8); border-radius: 26px; }
.ye-kart { position: absolute; height: 86%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; padding: 4px; border-radius: 18px; background: #fff;
    box-shadow: 0 6px 12px rgba(60, 40, 80, .2); touch-action: none; cursor: grab; transition: left .35s, top .35s, transform .2s, opacity .4s; }
.ye-kart img { width: 100%; height: 100%; object-fit: contain; border-radius: 14px; pointer-events: none; }
.ye-kart.tasiniyor { transition: none; transform: translate(-50%, -50%) scale(1.1); z-index: 20; }
.ye-kart.salla img { animation: b8-salla .45s; }
.ye-kart.parla { animation: b8-parla 1s ease-in-out infinite; }
.ye-kart.git { opacity: 0; transform: translate(-50%, 30%) scale(.6); }
@keyframes ye-otur { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } }
@keyframes ye-oyna { 30% { transform: scale(1.12) rotate(-3deg); filter: drop-shadow(0 0 14px #fff27a); } 60% { transform: scale(1.06) rotate(2deg); } }

.ye-neden { background: linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)), url('../assets/img/ogrenme/bg/cayir.webp') center / cover; }
.ye-sebep { position: absolute; left: 4%; top: 8%; width: 44%; aspect-ratio: 1; max-height: 84%; border-radius: 26px; background: #fff; box-shadow: 0 8px 18px rgba(60, 40, 80, .2); overflow: hidden; cursor: pointer; }
.ye-sebep img { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; transition: opacity .8s, transform 1.4s, filter 1.4s; }
.ye-sonuc-resim { opacity: 0; }
.ye-sebep.gel { animation: ye-otur .5s cubic-bezier(.3, 1.6, .5, 1); }
.ye-sebep.canli.eri .ye-sebep-resim { transform: scaleY(.55) translateY(40%); filter: brightness(1.1) saturate(.7); }
.ye-sebep.canli.buyu .ye-sebep-resim { transform: scale(1.15) translateY(-6%); }
.ye-sebep.canli.patla .ye-sebep-resim { animation: ye-sisir 1.3s ease-in forwards; }
.ye-sebep.canli.karar::after { content: ''; position: absolute; inset: 0; background: #1b1840; opacity: 0; animation: ye-karar 1.4s ease-in forwards; pointer-events: none; }
.ye-sebep.sonuc .ye-sebep-resim { opacity: 0; }
.ye-sebep.sonuc .ye-sonuc-resim { opacity: 1; }
.ye-sebep.sonuc::after { display: none; }
@keyframes ye-sisir { 80% { transform: scale(1.3); } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes ye-karar { to { opacity: .55; } }
.ye-soru { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: clamp(30px, 7vh, 60px); animation: b8-hzipla 1.6s ease-in-out infinite; }
.ye-secenekler { position: absolute; right: 3%; top: 6%; bottom: 6%; width: 42%; display: flex; flex-direction: column; gap: 3%; justify-content: center; align-items: center; }
.ye-secenek { flex: 0 1 auto; height: 30%; aspect-ratio: 1; border: 4px solid #fff; border-radius: 22px; background: #fff; padding: 4px; box-shadow: 0 6px 14px rgba(60, 40, 80, .2); cursor: pointer; transition: opacity .4s, transform .25s, border-color .25s; }
.ye-secenekler:has(.ye-secenek:nth-child(2):last-child) .ye-secenek { height: 44%; }
.ye-secenek img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; pointer-events: none; }
.ye-secenek.dogru { border-color: #6CC24A; transform: scale(1.06); }
.ye-secenek.yanlis { border-color: #FFB13B; }
.ye-secenek.salla img { animation: b8-salla .45s; }
.ye-secenek.sonuk { opacity: .35; }
.ye-secenek.parla { animation: b8-parla 1s ease-in-out infinite; }

.ye-guvenli { display: grid; place-items: center; background: #F6EEDF; container-type: size; }
.ye-ev { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc(100cqh * 1.78)); max-height: 100%; border-radius: 22px; overflow: hidden;
    background: url('../assets/img/ogrenme/bg/guvenli-ev.webp') center / 100% 100%, #FBE9D7; }
.ye-esya { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; padding: 0; background: none; cursor: pointer; transform-origin: 50% 100%; }
.ye-esya > img:first-child { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(60, 40, 30, .25)); pointer-events: none; }
.ye-esya.zipla > img:first-child { animation: b8-hzipla .45s ease-out 2; }
.ye-esya.parla > img:first-child { animation: b8-parla 1s ease-in-out infinite; }
.ye-esya.bulundu > img:first-child { filter: drop-shadow(0 0 10px #8fd3ff) saturate(.85); }
.ye-kalkan { position: absolute; right: -28%; top: -20%; width: 55%; height: 55%; object-fit: contain; animation: ye-otur .5s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.ye-sayac { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); display: flex; gap: 8px; background: rgba(255, 255, 255, .85); border-radius: 22px; padding: 5px 12px; z-index: 30; }
.ye-kalkan-yer { width: clamp(28px, 6vh, 46px); aspect-ratio: 1; opacity: .3; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.ye-kalkan-yer img { width: 100%; height: 100%; object-fit: contain; }
.ye-kalkan-yer.dolu { opacity: 1; filter: none; }
.ye-kalkan-yer.oturdu { animation: ye-otur .4s cubic-bezier(.3, 1.6, .5, 1); }
