/* ===== Sahneler (js/sahne.js): üst üste binme yok; her evre kendi bandında ===== */
.salon-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.kisi { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 1.2s ease; }
.kisi .kol { opacity: 0; transition: opacity .25s; }
.kisi.ayakta .kol { opacity: 1; }

/* Kürsü ve platformu: çapa çizgisi platform yüzeyinin ortası, kürsü tabanı bu çizgide; platformun önü salonun arkasına iner */
.kursu-sahne { position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--ks-alt, 30%); height: 0; pointer-events: none; }
.ks-platform { position: absolute; left: 50%; top: 0; width: var(--ks-pw); height: var(--ks-ph); transform: translate(-50%, -25%); }
.ks-kursu { position: absolute; left: 50%; bottom: 0; width: var(--ks-kw); transform: translate(-50%, 10%); }
.ks-havuz { position: absolute; left: 50%; bottom: 0; width: calc(var(--ks-pw) * .62); height: calc(var(--ks-kw) * 2.6); transform: translate(-50%, 18%); background: radial-gradient(ellipse 50% 50% at 50% 70%, rgba(255, 228, 196, .3), rgba(255, 228, 196, .07) 55%, transparent 72%); mix-blend-mode: screen; }

/* Maç başlığındaki canlı salon: başlığın en altında kendi şeridi. Kullanıcı konuşurken (sahnede) şerit sahneye büyür: kürsü platformda, salon önünde. */
.mac-ust .mac-sahne { position: relative; flex: 1 0 100%; height: 84px; margin: -4px -32px -24px; pointer-events: none; container-type: size; }
.mac-ust .mac-salon { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 100%; }
.mac-ust .mac-sahne .kursu-sahne { display: none; --ks-alt: 39%; --ks-kw: 24cqh; --ks-pw: min(92cqw, 150cqh); --ks-ph: 22cqh; }
.mac-ust.sahnede .mac-sahne { height: clamp(200px, 30vh, 300px); }
.mac-ust.sahnede .mac-salon { height: 40%; }
.mac-ust.sahnede .mac-sahne .kursu-sahne { display: block; }

/* Tam ekran sahne katmanı */
.sahne-ortu { position: fixed; inset: 0; z-index: 100; background: #000; opacity: 0; transition: opacity .35s; overflow: hidden; outline: none; }
.sahne-ortu.acik { opacity: 1; }
.sahne-ortu .so-gok { position: absolute; inset: 0; --karart: .25; }
.so-ipucu { position: absolute; z-index: 6; right: 24px; top: 20px; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .55); }

/* Sahne katmanı kendi kabında. Sesli konuşmada (konusma) sahne tam ekran kalır; süre, döküm ve düğmeler üstünde cam kartlar.
   Ortada kürsü, altta kalabalık açık kalır: kartlar yanlarda ve üst bölgede, birbirinin üstüne binmez. */
.kursuye-cikis .so-sahne { position: absolute; inset: 0; overflow: hidden; }
.kursuye-cikis.konusma.kartli .so-baslik, .kursuye-cikis.konusma .so-baslik { opacity: 0; pointer-events: none; }
.so-hud { position: absolute; z-index: 6; inset: 0 0 30% 0; padding: 24px; display: grid; gap: 16px;
  grid-template-columns: minmax(260px, 25vw) 1fr minmax(240px, 22vw); grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "kim . zam" "gov . eyl" "gov . poi" "gov . ."; pointer-events: none; animation: so-hud .6s cubic-bezier(.2, .8, .2, 1) both; }
.so-hud > * { pointer-events: auto; min-width: 0; }
@keyframes so-hud { from { opacity: 0; transform: translateY(-8px); } }
/* Cam: koyu, bulanık, üst kenarda ince ışık; markanın koyu kart çizgisi korunur */
.so-hud .hud-kart, .so-hud .eylem-cubugu, .so-hud .poi-kutu {
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)), rgba(14, 10, 16, .4);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 16px 48px rgba(0, 0, 0, .35); }
.hud-kim { grid-area: kim; display: flex; gap: 12px; align-items: center; align-self: start; }
.hud-kim .hud-rol { font-size: 20px; line-height: 26px; font-weight: 600; color: var(--beyaz); }
.hud-kim .taraf { font-size: 12px; }
.hud-kim .kucuk { margin-top: 2px; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .7); }
.hud-zaman { grid-area: zam; align-self: start; }
.hud-zaman .sayac { text-align: right; }
.hud-zaman .zil-cizgi { margin-top: 12px; }
.hud-zaman .zil-alt { margin-top: 8px; color: rgba(255, 255, 255, .7); flex-wrap: wrap; gap: 6px 12px; }
.hud-zaman .zil-alt > span:first-child { flex: 1 1 140px; }
.hud-govde { grid-area: gov; align-self: start; max-height: 100%; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.hud-govde #sen-govde { display: flex; flex-direction: column; min-height: 0; }
.so-hud .canli-dokum { flex: 1 1 auto; min-height: 96px; max-height: none; overflow-y: auto; background: rgba(0, 0, 0, .28); font-size: 17px; line-height: 28px; }
.so-hud .kayit-gorsel { padding: 8px 0 0; }
.so-hud .dalga { width: 72px; height: 72px; }
.hud-eylem { grid-area: eyl; align-self: start; }
.so-hud .eylem-cubugu { position: static; margin: 0; padding: 12px; }
.so-hud .eylem-ic { padding: 0; max-width: none; flex-direction: column; align-items: stretch; gap: 8px; }
.so-hud .eylem-ic .btn { width: 100%; justify-content: center; }
.so-hud .eylem-ic .siradaki { display: block; text-align: center; flex: none; }
.hud-poi { grid-area: poi; align-self: start; }
.hud-poi #poi-gelen:empty { display: none; }
/* Mikrofon açılamadı: karar kullanıcıda; tekrar dene ya da bilerek yazıya geç */
.mik-hata { display: flex; flex-direction: column; gap: 12px; }
.mik-hata b { font-size: 17px; color: var(--beyaz); }
.mik-hata p { margin: 0; font-size: 14px; line-height: 20px; color: rgba(255, 255, 255, .78); }
.mik-hata .satir { display: flex; flex-wrap: wrap; gap: 8px; }
.so-hud .hud-govde.uyari { border-color: rgba(248, 113, 113, .55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 0 4px rgba(248, 113, 113, .12), 0 16px 48px rgba(0, 0, 0, .35); }
@media (max-width: 760px) {
  .so-hud { inset: 0; padding: 12px; gap: 10px; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas: "kim zam" "gov gov" "poi poi" ". ." "eyl eyl"; }
  .so-hud .hud-kart, .so-hud .eylem-cubugu, .so-hud .poi-kutu { padding: 12px; border-radius: 16px; }
  .hud-kim .kimlik, .hud-kim .kucuk, .hud-zaman .zil-alt { display: none; }
  .hud-kim .hud-rol { font-size: 17px; line-height: 22px; }
  .hud-zaman .sayac.buyuk { font-size: 34px; line-height: 38px; }
  .hud-zaman .zil-cizgi { margin-top: 8px; }
  .hud-govde { max-height: 28vh; }
  .so-hud .canli-dokum { min-height: 72px; font-size: 15px; line-height: 24px; }
  .so-hud .eylem-ic .siradaki { display: none; }
}

/* Kürsüye çıkış: başlık üstte (yüzde 9-35), kürsü ortada (yüzde 52-73), salon altta (yüzde 64-100) */
.kursuye-cikis .so-salon { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 36%; transform: translateY(100%); transition: transform .9s cubic-bezier(.2, .8, .2, 1) .15s; }
.kursuye-cikis.acik .so-salon { transform: none; }
.kursuye-cikis .so-havuz { position: absolute; z-index: 1; left: 50%; top: 40%; width: min(560px, 60vw); height: 44%; transform: translateX(-50%); background: radial-gradient(ellipse 50% 50% at 50% 62%, rgba(255, 228, 196, .34), rgba(255, 228, 196, .08) 55%, transparent 72%); mix-blend-mode: screen; opacity: 0; transition: opacity .9s; pointer-events: none; }
.kursuye-cikis.isikli .so-havuz { opacity: 1; }
.kursuye-cikis .kursu-sahne { --ks-alt: 27%; --ks-kw: min(140px, 16vw, 19vh); --ks-pw: min(860px, 94vw); --ks-ph: calc(var(--ks-kw) * .95); }
.kursuye-cikis .ks-havuz { display: none; }
.kursuye-cikis .ks-platform { opacity: 0; transition: opacity .8s; }
.kursuye-cikis.acik .ks-platform { opacity: 1; }
.kursuye-cikis .ks-kursu { opacity: 0; transform: translate(-50%, 35%); transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s; }
.kursuye-cikis.isikli .ks-kursu { transform: translate(-50%, 10%); opacity: 1; }
.kursuye-cikis .so-baslik { position: absolute; z-index: 5; left: 16px; right: 16px; top: 9%; text-align: center; opacity: 0; transform: translateY(-12%); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.kursuye-cikis.kartli .so-baslik { opacity: 1; transform: none; }
.so-baslik .s-ust { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(13px, 1.6vw, 18px); color: #ececec; }
.so-baslik .ad { font-size: clamp(32px, 5.4vw, 72px); line-height: 1.1; font-weight: 600; color: var(--beyaz); margin: 10px 0 12px; text-wrap: balance; }
.so-baslik .alt { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 40px; font-size: clamp(13px, 1.6vw, 18px); color: #dcdcdc; }
.so-baslik .sus-yazi, .so-baslik .tokmak-i { display: none; }
.kursuye-cikis.sus .so-baslik .s-bilgi { display: none; }
.kursuye-cikis.sus .so-baslik .sus-yazi { display: inline; animation: so-belir .5s ease-out; }
.kursuye-cikis.vur .so-baslik .tokmak-i { display: inline-block; width: 64px; }
.kursuye-cikis.vur .so-baslik .tokmak-i .tk-cekic { transform-box: fill-box; transform-origin: 96% 45%; animation: tk-vur .7s cubic-bezier(.3, 0, .2, 1); }
.so-baslik .tokmak-i svg { display: block; width: 100%; height: auto; }
@keyframes so-belir { from { opacity: 0; } to { opacity: 1; } }
@keyframes so-vur { 0% { transform: rotate(-35deg); } 55% { transform: rotate(8deg); } 70% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
@keyframes tk-vur { 0% { transform: rotate(28deg); } 55% { transform: rotate(-3deg); } 70% { transform: rotate(1.5deg); } 100% { transform: rotate(0); } }

/* Karar töreni: başlık, kartlar, şerit alt alta tek sütun */
.karar-toreni .toren { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; justify-content: center; gap: clamp(12px, 2.4vh, 28px); padding: clamp(20px, 5vh, 56px) clamp(16px, 5vw, 64px); transition: opacity .35s; }
.karar-toreni .t-baslik { flex: none; text-align: center; }
.karar-toreni .t-baslik .s-ust { font-size: clamp(12px, 1.4vw, 16px); color: #e5e5e5; }
.karar-toreni .t-baslik .buyuk { font-size: clamp(28px, 4.2vw, 56px); line-height: 1.15; font-weight: 600; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .5); }
.karar-toreni .t-kartlar { flex: 0 1 min(360px, 52vh); min-height: 0; width: 100%; max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(var(--adet), minmax(0, 1fr)); gap: clamp(8px, 1.6vw, 20px); perspective: 1200px; }
.t-takim { position: relative; min-width: 0; min-height: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, .1, .2, 1); }
.t-takim.acik { transform: rotateY(180deg); }
.t-takim .yuz { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; padding: clamp(12px, 1.8vw, 24px); overflow: hidden; }
.t-takim .arka { background: rgba(10, 10, 14, .72); border: 1px solid rgba(255, 255, 255, .14); align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.t-takim .arka svg { width: 38%; max-width: 72px; opacity: .55; }
.t-takim .on { transform: rotateY(180deg); background: rgba(14, 14, 18, .86); border: 1px solid rgba(255, 255, 255, .16); }
.t-takim.sen .on { background: #fff; color: #000; border-color: #fff; }
.t-takim .t-sira { font-family: var(--mono); font-size: clamp(28px, 4.4vw, 56px); font-weight: 600; line-height: 1; }
.t-takim .tad { font-size: clamp(13px, 1.5vw, 18px); line-height: 1.25; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.t-takim .sen-et { font-size: 12px; font-weight: 600; opacity: .65; margin-top: 4px; }
.t-takim .ger { font-size: clamp(12px, 1.2vw, 14px); line-height: 1.4; opacity: .75; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.karar-toreni .t-serit { flex: none; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: stretch; opacity: 0; transform: translateY(15%); transition: opacity .45s, transform .45s; }
.karar-toreni.serit .t-serit { opacity: 1; transform: none; }
.t-serit .kutu { min-width: 128px; padding: 12px 20px; border-radius: 16px; text-align: center; }
.t-serit .kutu b { display: block; font-family: var(--mono); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; color: #fff; }
.t-serit .kutu b.iyi { color: var(--iyi); }
.t-serit .kutu b.kotu { color: var(--hata); }
.t-serit .kutu small { font-size: 12px; color: #d4d4d4; }
.t-serit .t-devam { align-self: center; }
.karar-toreni.an-acik .toren { opacity: 0; }
.karar-toreni .t-an { position: absolute; z-index: 7; inset: 0; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; pointer-events: none; text-align: center; padding: 24px; }
.karar-toreni.an-acik .t-an { opacity: 1; visibility: visible; transition: opacity .4s .3s, visibility 0s .3s; }
.t-an .madalya { width: clamp(96px, 13vw, 160px); aspect-ratio: 1; margin: 0 auto 16px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.karar-toreni.an-acik .madalya { animation: so-parla 1.4s ease-out .6s 2; }
@keyframes so-parla { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); } 100% { box-shadow: 0 0 0 40px rgba(255, 255, 255, 0); } }
.t-an .madalya svg { width: 52%; }
.t-an .s-ust { font-size: 16px; color: #e5e5e5; }
.t-an .ad { font-size: clamp(28px, 4vw, 48px); font-weight: 600; color: #fff; }
.t-an .tarif { font-size: 15px; color: #dcdcdc; }

/* Zil çizgisi: konuşmacı kartında sayacın altında; taralı kısımlar korumalı süre */
.zil-cizgi { position: relative; height: 10px; border-radius: 9999px; background: #26262e; }
.zil-cizgi.ince { height: 4px; }
.zil-cizgi .kor { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #3c3c47 0 5px, #30303a 5px 10px); }
.zil-cizgi .kor.bas { left: 0; border-radius: 9999px 0 0 9999px; }
.zil-cizgi .kor.son { right: 0; border-radius: 0 9999px 9999px 0; }
.zil-cizgi i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 9999px; background: var(--beyaz); transition: width .3s linear; }
.zil-cizgi.bitti i { background: var(--hata); }
.zil-cizgi.parla { animation: zil-parla .9s ease-out; }
@keyframes zil-parla { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .65); } 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.zil-alt { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: -12px; font-size: 12px; line-height: 16px; color: var(--soluk); min-height: 28px; }
.zil-durum { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 9999px; background: var(--kart3); color: #e5e5e5; font-weight: 600; white-space: nowrap; }
.zil-durum svg { width: 14px; height: 14px; transform-origin: 50% 12%; }
.zil-durum.cal svg { animation: zil-salla .9s ease-in-out; }
@keyframes zil-salla { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(22deg); } 35% { transform: rotate(-18deg); } 55% { transform: rotate(12deg); } 75% { transform: rotate(-6deg); } }

@media (max-width: 760px) {
  .mac-ust .mac-sahne { margin: -4px -20px -16px; height: 64px; }
  .mac-ust.sahnede .mac-sahne { height: clamp(176px, 26vh, 220px); }
  .karar-toreni .t-kartlar { grid-template-columns: repeat(min(var(--adet), 2), minmax(0, 1fr)); flex-basis: min(480px, 58vh); }
  .t-takim .ger { -webkit-line-clamp: 3; }
  .t-serit .kutu { min-width: 96px; }
}
@media (max-height: 500px) { .mac-ust.sahnede .mac-sahne { height: 150px; } }
/* Dar ve alçak ekranda konuşma sırası kartın üstünde yatay kayan şerit olur (yapışkan kalırsa kaydırınca kartın üstüne biner).
   Ad üstte, durum ("konuşuyor") altında; yazılar üst üste binmez. */
@media (max-width: 900px), (max-height: 500px) {
  .sira-panel { position: static; max-width: none; flex-basis: 100%; }
  .konusma-sira { flex-direction: row; overflow-x: auto; }
  .konusma-sira li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; align-content: center; min-width: 168px; }
  .konusma-sira li .ad { grid-column: 2; }
  .konusma-sira li small { grid-column: 2; }
  .konusma-sira li small:empty { display: none; }
  .konusma-sira li.bitti::after { grid-column: 3; grid-row: 1; }
  .konusma-sira li .nokta { grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) { .sahne-ortu, .kisi { transition: none !important; } }
