/* =====================================================================
   ÇALGI HAFIZA KARTLARI – stil dosyası (Nane teması)
   Sistem yazı tipi yığını kullanılır; dış yazı tipi / kütüphane yoktur.
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-user-select: none; user-select: none; }
:root {
  --yazi: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  /* NANE TEMASI (açık) – renkleri değiştirmek için yalnızca bu değişkenleri düzenleyin */
  --zemin: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 100%);
  --panel: rgba(255, 255, 255, .94); --beyaz: #ffffff; --acik: #f4fdf9;
  --kenar: #a7f3d0; --cip: #d1fae5; --cip-uzeri: #a7f3d0;
  --metin: #064e3b; --metin-2: #1f5f4a; --soluk: #4b7f6c;
  --golge: rgba(6, 78, 59, .16);
  --p1: #10b981; --p2: #f59e0b;
  --yesil: #22c55e; --kirmizi: #ef4444; --amber: #f59e0b; --mor: #8b5cf6; --mercan: #fb7185;
  --kart-zemin: linear-gradient(160deg, #f1f5fa, #d9e3ee);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--yazi);
  background: var(--zemin) fixed;
  background-color: #d1fae5;
  min-height: 100vh; color: var(--metin);
  padding: 0 .5rem 1.5rem; overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:disabled { cursor: not-allowed; }
.gizli { display: none !important; }

/* ---------- Üst yüzen düğmeler ---------- */
.ust-dugme {
  position: fixed; top: .75rem; z-index: 50; display: flex; align-items: center; gap: .5rem;
  height: 2.75rem; padding: 0 .875rem; border-radius: 1rem;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--kenar);
  color: var(--metin); font-size: .875rem; font-weight: 800; text-decoration: none;
  backdrop-filter: blur(12px); transition: background .2s, transform .1s;
}
.ust-dugme:hover { background: var(--beyaz); color: #047857; box-shadow: 0 4px 12px var(--golge); }
.ust-dugme:active { transform: scale(.95); }
#ayarlar-dugme { left: .75rem; }
#ana-sayfa-dugme { left: 50%; transform: translateX(-50%); }
#ana-sayfa-dugme:active { transform: translateX(-50%) scale(.95); }
#tam-ekran-dugme { right: .75rem; }

/* ---------- Pencereler ---------- */
.pencere-arka {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(6, 78, 59, .35); backdrop-filter: blur(10px);
}
.pencere {
  width: 100%; max-width: 28rem; background: var(--beyaz); border: 2px solid var(--kenar); border-radius: 1.5rem;
  padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 25px 50px -12px rgba(6, 78, 59, .35);
  max-height: calc(100vh - 2rem); overflow-y: auto;
}
.pencere-ust { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--kenar); padding-bottom: .75rem; }
.pencere-ust h3 { font-size: 1.25rem; font-weight: 900; }
.pencere-x { width: 2.25rem; height: 2.25rem; border-radius: .75rem; background: var(--cip); color: var(--soluk); font-size: 1.4rem; font-weight: 700; }
.pencere-x:hover { color: var(--metin); background: var(--cip-uzeri); }
.cikis-dugme { padding: .9rem; border-radius: 1rem; background: rgba(239, 68, 68, .07); border: 2px solid rgba(239, 68, 68, .45); color: #b91c1c; font-weight: 800; font-size: 1rem; }
.cikis-dugme:hover { background: rgba(239, 68, 68, .14); }
.kategori-don-dugme { padding: .9rem; border-radius: 1rem; background: var(--p1); color: #fff; font-weight: 800; font-size: 1rem; }
.kategori-don-dugme:hover { filter: brightness(.93); }
.kapat-dugme { padding: .8rem; border-radius: 1rem; background: var(--cip); color: var(--metin); font-weight: 800; }
.kapat-dugme:hover { background: var(--cip-uzeri); }

.kategori-pencere { max-width: 46rem; text-align: center; }
.kategori-pencere h2 { font-size: 1.6rem; font-weight: 900; }
.kategori-alt { color: var(--soluk); font-weight: 600; }
.kategori-alt.hata { color: #b91c1c; font-weight: 800; }
.tekrar-dugme { align-self: center; margin: 0 auto; padding: .65rem 1.4rem; border-radius: .9rem; background: var(--p1); color: #fff; font-weight: 900; }
.tekrar-dugme:hover { filter: brightness(.93); }
.kategori-izgara { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.kat {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.1rem .8rem 1rem;
  border-radius: 1.25rem; border: 2px solid var(--kenar); background: var(--acik); transition: transform .15s, border-color .15s, background .15s;
}
.kat:hover { transform: translateY(-3px); }
.kat-sayi { align-self: flex-end; font-size: .72rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; background: var(--cip); color: var(--metin-2); }
.kat-simge { font-size: 2.6rem; line-height: 1; }
.kat-resim { width: 5.2rem; height: 2.7rem; object-fit: cover; display: block; margin: .15rem 0 0; filter: drop-shadow(0 4px 6px rgba(6, 78, 59, .3)); pointer-events: none; }
.kat-isim { font-size: 1.1rem; font-weight: 900; }
.kat-ornek { font-size: .78rem; color: var(--soluk); line-height: 1.35; }
.kat.k-t:hover { border-color: #f59e0b; background: rgba(245, 158, 11, .08); }
.kat.k-w:hover { border-color: #3b82f6; background: rgba(59, 130, 246, .08); }
.kat.k-f:hover { border-color: #22c55e; background: rgba(34, 197, 94, .08); }
.ikincil-dugme { align-self: center; padding: .6rem 1.2rem; border-radius: .9rem; background: var(--cip); color: var(--metin); font-weight: 800; }
.ikincil-dugme:hover { background: var(--cip-uzeri); }

/* ---------- Ana düzen ---------- */
#duzen { display: flex; justify-content: center; align-items: flex-start; gap: 1rem; margin: 4.25rem auto 0; max-width: 60rem; }
#duzen.genis { max-width: none; justify-content: space-between; gap: .75rem; }
#duzen.genis #ana-kart { max-width: none; }
#ana-kart {
  flex: 1 1 auto; min-width: 0; max-width: 60rem; background: var(--panel); border: 1px solid var(--kenar);
  border-radius: 1.5rem; box-shadow: 0 10px 40px var(--golge); backdrop-filter: blur(24px); overflow: hidden;
}
#ana-alan { padding: 1.75rem 1.5rem; }
.yan-sutun { flex: 0 0 10rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 4.25rem; }

/* ---------- Giriş ---------- */
#giris-ekrani { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; }
.baslik { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; letter-spacing: -.02em; }
.baslik span { background: linear-gradient(90deg, #059669, #10b981, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.giris-aciklama { color: var(--metin-2); font-size: 1.05rem; max-width: 38rem; line-height: 1.5; }
.vurgu { color: #d97706; font-weight: 800; }
.mod-izgara { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; width: 100%; }
.mod-kart {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left; padding: 1rem 1.1rem;
  border-radius: 1.25rem; border: 2px solid var(--kenar); background: var(--acik); opacity: .85; transition: all .15s;
}
.mod-kart:hover { opacity: 1; border-color: #34d399; }
.mod-ust { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.mod-simge { font-size: 1.8rem; }
.rozet { visibility: hidden; font-size: .72rem; font-weight: 900; padding: .2rem .6rem; border-radius: 999px; color: #fff; }
.mod-baslik { font-size: 1.15rem; font-weight: 900; }
.mod-aciklama { font-size: .85rem; color: var(--soluk); line-height: 1.4; }
.mod-kart.secili { opacity: 1; }
.mod-kart.secili .rozet { visibility: visible; }
.mod-sunum.secili { border-color: var(--mor); background: rgba(139, 92, 246, .08); } .mod-sunum .rozet { background: var(--mor); }
.mod-egzersiz.secili { border-color: var(--yesil); background: rgba(34, 197, 94, .1); } .mod-egzersiz .rozet { background: var(--yesil); }
.mod-bireysel.secili { border-color: #0ea5e9; background: rgba(14, 165, 233, .08); } .mod-bireysel .rozet { background: #0ea5e9; }
.mod-takim.secili { border-color: var(--p2); background: rgba(245, 158, 11, .1); } .mod-takim .rozet { background: var(--p2); }

.kunye-kart { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.6rem; border-radius: 1rem; background: var(--acik); border: 1px solid var(--kenar); font-size: 1.1rem; }
.kunye-rol, .rol-1, .rol-2 { font-weight: 800; }
.rol-1 { color: #059669; } .rol-2 { color: #d97706; }
.kunye-isim, .alt-isim { color: var(--metin); font-weight: 700; }
.basla-dugme {
  padding: 1rem 2.5rem; border-radius: 1.1rem; font-size: 1.3rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 25px -5px rgba(16, 185, 129, .5); transition: transform .1s, filter .15s;
}
.basla-dugme:hover { filter: brightness(1.08); }
.basla-dugme:active { transform: scale(.97); }
.basla-dugme:disabled { filter: grayscale(.7); opacity: .7; }

/* ---------- Oyun üst barı ---------- */
.ust-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-bottom: .9rem; margin-bottom: 1rem; border-bottom: 1px solid var(--kenar); }
.ust-sol { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sayac { font-weight: 900; font-size: 1rem; padding: .35rem .8rem; border-radius: .7rem; background: var(--cip); }
.cip { font-weight: 800; font-size: .85rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid; }
.cip.k-t { color: #b45309; border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .1); }
.cip.k-w { color: #1d4ed8; border-color: rgba(59, 130, 246, .5); background: rgba(59, 130, 246, .1); }
.cip.k-f { color: #047857; border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .1); }
.mod-gosterge { color: var(--soluk); font-weight: 700; font-size: .9rem; }
.mod-gosterge span { color: var(--metin); font-weight: 900; }

.oyun-ic { display: flex; flex-direction: column; gap: 1rem; }
.bas { display: flex; align-items: center; justify-content: center; gap: 1rem; text-align: center; min-height: 4.2rem; }
.yonerge { font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 900; line-height: 1.25; }
.yonerge small { display: block; font-size: .9rem; font-weight: 700; color: var(--soluk); margin-top: .25rem; }

/* süre halkası (--p: kalan yüzde) */
.sure { flex: 0 0 auto; }
.halka {
  --p: 100%; width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--p1) var(--p), var(--cip) 0);
}
.halka span { width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--beyaz); display: grid; place-items: center; font-size: 1.35rem; font-weight: 900; }
.halka.az { background: conic-gradient(var(--kirmizi) var(--p), var(--cip) 0); }
.halka.az span { color: #dc2626; }

/* ezber süresi çubuğu */
.cubuk { height: .55rem; border-radius: 999px; background: var(--cip); overflow: hidden; }
.cubuk i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #10b981, #f59e0b); border-radius: 999px; }

.serit { text-align: center; font-weight: 800; padding: .55rem; border-radius: .8rem; background: rgba(16, 185, 129, .1); color: #047857; border: 1px solid rgba(16, 185, 129, .4); }
.serit.bil { background: rgba(245, 158, 11, .12); color: #b45309; border-color: rgba(245, 158, 11, .4); }

/* ---------- Kartlar ---------- */
/* Tüm modlarda ve slaytlarda kartlar aynı (en büyük) boyutta: genişlik her zaman
   "satırda 5 kart" ölçüsüne göre; az kartlı satırlar ortalanır. */
.kart-izgara { --sutun: 5; --ara: .8rem; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ara); perspective: 900px; }
.kart-izgara > .ck { flex: 0 0 auto; width: calc((100% - (var(--sutun) - 1) * var(--ara)) / var(--sutun)); }
.ck {
  position: relative; display: flex; flex-direction: column; border-radius: 1rem; padding: .45rem .45rem .5rem;
  background: var(--kart-zemin); border: 3px solid transparent; box-shadow: 0 6px 14px var(--golge);
  transition: transform .12s, border-color .15s, opacity .2s; cursor: default; min-width: 0;
}
.ck .f { aspect-ratio: 1; display: grid; place-items: center; border-radius: .7rem; overflow: hidden; }
.ck img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.ck .ad { min-height: 2.3em; display: flex; align-items: center; justify-content: center; text-align: center; font-size: clamp(1rem, 1.5vw, 1.35rem); font-weight: 900; color: #1c2340; line-height: 1.15; padding: .15rem .1rem 0; }
#oyun-ekrani .ck:not([tabindex="-1"]) { cursor: pointer; }
#oyun-ekrani .ck:not([tabindex="-1"]):hover { transform: translateY(-3px); }
.ck.sec { border-color: var(--p1); box-shadow: 0 0 0 3px rgba(16, 185, 129, .35), 0 6px 14px var(--golge); }
.ck.dog { border-color: var(--yesil); }
.ck.yan { border-color: var(--kirmizi); }
.ck.kac { border-color: var(--amber); border-style: dashed; }
.ck.sonuk { opacity: .4; }
.ck.arka { background: linear-gradient(145deg, #065f46, #10b981 60%, #f59e0b); }
.ck.arka .f { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 10px, transparent 10px 20px); border: 2px solid rgba(255, 255, 255, .25); }
.ck.arka .nota { font-size: clamp(2rem, 5vw, 3.2rem); color: rgba(255, 255, 255, .85); }
.ck .no {
  position: absolute; top: .4rem; right: .4rem; z-index: 2; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--p1); color: #fff; font-weight: 900; font-size: .95rem; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.ck .et { position: absolute; left: 50%; bottom: -.7rem; transform: translateX(-50%); white-space: nowrap; font-size: .72rem; font-weight: 900; padding: .2rem .55rem; border-radius: 999px; color: #fff; border: 2px solid #fff; }
.ck .et.g { background: var(--yesil); } .ck .et.r { background: var(--kirmizi); } .ck .et.k { background: var(--amber); color: #1f1300; }

.noktalar { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; }
.noktalar i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--kenar); }
.noktalar i.a { background: var(--p1); width: 1.4rem; border-radius: 999px; }

.alt-dugmeler { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; margin-top: .6rem; }
.btn { padding: .8rem 1.6rem; border-radius: 1rem; font-weight: 900; font-size: 1rem; color: #fff; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.96); }
.btn.mercan { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 8px 20px -6px rgba(245, 158, 11, .55); }
.btn:hover { filter: brightness(1.08); }

/* ---------- Puan kartları ve yön düğmeleri ---------- */
.skor { position: relative; text-align: center; padding: 1.8rem .75rem; min-height: 15rem; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; border-radius: 1.25rem; background: var(--beyaz); border: 2px solid var(--p1); box-shadow: 0 6px 20px rgba(16, 185, 129, .2); }
.skor.p2, .skor.t2 { border-color: var(--p2); box-shadow: 0 6px 20px rgba(245, 158, 11, .2); }
.skor.pasif { opacity: .45; box-shadow: none; }
/* Bireysel: oyun sırasında rekor geçilince rekor kartı turuncu parlar */
.skor.yeni-rekor { border-color: var(--p2); background: #fffbeb; box-shadow: 0 0 0 5px rgba(245, 158, 11, .28), 0 6px 22px rgba(245, 158, 11, .35); animation: rekor-parla 1.6s ease-in-out infinite; }
.skor.yeni-rekor .skor-deger { color: var(--p2); }
.skor.yeni-rekor .skor-alt { color: #b45309; }
@keyframes rekor-parla { 0%, 100% { box-shadow: 0 0 0 4px rgba(245, 158, 11, .22), 0 6px 22px rgba(245, 158, 11, .3); } 50% { box-shadow: 0 0 0 9px rgba(245, 158, 11, .35), 0 6px 28px rgba(245, 158, 11, .5); } }
@media (prefers-reduced-motion: reduce) { .skor.yeni-rekor { animation: none; } }
.skor.aktif { transform: scale(1.03); }
.sira { margin-top: .4rem; padding: .35rem .8rem; border-radius: 999px; font-size: 1.05rem; font-weight: 900; letter-spacing: .04em; color: #fff; background: var(--p1); animation: sira-nabiz 1.4s ease-in-out infinite; }
.skor.t2 .sira { background: var(--p2); }
@keyframes sira-nabiz { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.skor-baslik { font-weight: 900; font-size: 1.35rem; color: var(--metin); }
.skor-deger { font-size: 3.8rem; font-weight: 900; line-height: 1.05; }
.skor-alt { font-size: 1.05rem; color: var(--soluk); font-weight: 800; }
.yon { width: 100%; padding: .95rem .5rem; border-radius: 1rem; font-weight: 900; font-size: 1.05rem; background: var(--beyaz); border: 2px solid var(--kenar); color: var(--metin); transition: all .15s; }
.yon:hover:not(:disabled) { background: var(--cip); }
.yon:disabled { opacity: .35; }
.yon.parla:not(:disabled) { background: linear-gradient(135deg, #10b981, #059669); border-color: #10b981; color: #fff; box-shadow: 0 8px 20px -6px rgba(16, 185, 129, .55); }
.mobil-skor, .mobil-yon { display: none; }

/* ---------- Sonuç ---------- */
#sonuc-ekrani { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.sonuc-simge { font-size: 4rem; line-height: 1; }
.sonuc-baslik { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; }
.sonuc-alt { color: var(--metin-2); font-size: 1.05rem; max-width: 40rem; line-height: 1.45; white-space: pre-line; }
.sonuc-tablo { display: flex; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.sonuc-tablo > div { min-width: 9rem; padding: .9rem 1rem; border-radius: 1rem; background: var(--beyaz); border: 2px solid var(--kenar); display: flex; flex-direction: column; gap: .2rem; }
.sonuc-tablo b { font-size: 1.6rem; font-weight: 900; }
.sonuc-tablo span { font-size: .8rem; color: var(--soluk); font-weight: 700; }
.sonuc-tablo .s2 { border-color: var(--p2); }
.sonuc-tablo .t1 { border-color: var(--p1); } .sonuc-tablo .t2 { border-color: var(--p2); }
.sonuc-tablo.iki b { font-size: 2.4rem; }
.sonuc-kartlar { width: 100%; margin: .5rem 0 .8rem; }
.sonuc-dugmeler { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.sonuc-birincil, .sonuc-ikincil { padding: .85rem 1.6rem; border-radius: 1rem; font-weight: 900; font-size: 1rem; }
.sonuc-birincil { color: #fff; background: linear-gradient(135deg, #10b981, #059669); }
.sonuc-ikincil { color: var(--metin); background: var(--cip); border: 2px solid var(--kenar); }

#alt-kunye { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; padding: .9rem 1rem; border-top: 1px solid var(--kenar); font-size: 1rem; background: var(--acik); }

/* ---------- Duyarlı düzen ---------- */
@media (max-width: 1023px) {
  .yan-sutun { display: none !important; }
  .mobil-skor { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
  .mobil-skor .skor { padding: .6rem .5rem; min-height: 0; gap: .2rem; }
  .mobil-skor .skor-baslik { font-size: 1.05rem; }
  .mobil-skor .skor-deger { font-size: 2.2rem; }
  .mobil-skor .skor-alt { font-size: .9rem; }
  .mobil-skor .sira { font-size: .85rem; margin-top: .15rem; padding: .25rem .6rem; }
  .mobil-yon { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .4rem; }
}
@media (max-width: 760px) {
  .kart-izgara { --sutun: 4; --ara: .5rem; }
  .kategori-izgara { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { padding: 0 .35rem 1rem; }
  .ust-dugme { top: .4rem; height: 2.2rem; padding: 0 .55rem; border-radius: .75rem; }
  .ust-dugme span + span { display: none; }
  #ayarlar-dugme { left: .4rem; } #tam-ekran-dugme { right: .4rem; }
  #duzen { margin-top: 3.2rem; }
  #ana-alan { padding: 1rem .7rem; }
  /* mod seçimi telefonda da 2x2 */
  .mod-izgara { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .mod-kart { padding: .7rem .65rem .8rem; gap: .25rem; border-radius: 1rem; min-height: 9.5rem; }
  .mod-simge { font-size: 1.5rem; }
  .rozet { font-size: .6rem; padding: .15rem .45rem; }
  .mod-baslik { font-size: .95rem; }
  .mod-aciklama { font-size: .72rem; line-height: 1.35; }
  /* çalgı kartları: satırda 3, aşağı doğru biraz uzun */
  .kart-izgara { --sutun: 4; --ara: .4rem; }   /* dik telefon: 4-4-2 */
  .ck { padding: .22rem .22rem .28rem; border-radius: .65rem; border-width: 2px; }
  .ck .f { border-radius: .55rem; aspect-ratio: 4 / 5; }
  .ck .ad { font-size: .72rem; min-height: 2.5em; padding: .12rem 0 0; }
  .ck .no { width: 1.3rem; height: 1.3rem; font-size: .7rem; top: .25rem; right: .25rem; border-width: 2px; }
  .ck .et { font-size: .55rem; padding: .1rem .32rem; bottom: -.55rem; }
  .ck:has(.et) { padding-bottom: .6rem; }   /* etiket, iki satırlı adın üstüne binmesin */
  .kart-izgara:has(.et) { row-gap: .8rem; }
  .ck.arka .nota { font-size: 2.2rem; }
  /* yönerge + süre halkası yan yana (1x2): dikeyde yer kazanmak için */
  .bas { flex-direction: row; justify-content: center; align-items: center; gap: .6rem; min-height: 0; text-align: left; }
  .bas .yonerge { flex: 0 1 auto; font-size: 1.05rem; }
  .bas .yonerge small { font-size: .78rem; }
  .bas:not(:has(.sure)) { text-align: center; }
  .halka { width: 3rem; height: 3rem; } .halka span { width: 2.35rem; height: 2.35rem; font-size: 1.05rem; }
  .basla-dugme { padding: .65rem 1.4rem; font-size: 1rem; border-radius: .9rem; }
  /* künyeler ve düğmeler (telefon) */
  .kunye-kart { font-size: .7rem; padding: .45rem .75rem; gap: .15rem; border-radius: .75rem; }
  #alt-kunye { font-size: .66rem; gap: .2rem .8rem; padding: .45rem .5rem; }
  /* puan kartları (telefon): ince ve kısa */
  .mobil-skor { gap: .4rem; }
  .mobil-skor .skor { padding: .3rem .4rem; gap: 0; border-width: 2px; border-radius: .8rem; }
  .mobil-skor .skor.aktif { transform: none; }
  .mobil-skor .skor-baslik { font-size: .8rem; }
  .mobil-skor .skor-deger { font-size: 1.45rem; line-height: 1.1; }
  .mobil-skor .skor-alt { font-size: .68rem; }
  .mobil-skor .sira { font-size: .62rem; margin-top: .15rem; padding: .12rem .45rem; }
  .yon { padding: .55rem .4rem; font-size: .85rem; border-radius: .75rem; }
  .mobil-yon { gap: .45rem; }
  .btn { padding: .55rem 1.1rem; font-size: .85rem; border-radius: .8rem; }
  .alt-dugmeler { gap: .5rem; margin-top: .3rem; }
  .sonuc-birincil, .sonuc-ikincil { padding: .6rem 1.1rem; font-size: .85rem; border-radius: .8rem; }
  .ikincil-dugme, .kapat-dugme, .cikis-dugme, .kategori-don-dugme { padding: .55rem .9rem; font-size: .85rem; }
  .buyut-dugme { width: 2.3rem; height: 2.3rem; font-size: 1.2rem; }
  .buyut-sifirla { padding: .5rem .7rem; font-size: .8rem; }
}
/* Yatay tutulan telefon: kartlar yine 5'erli dizilir, iki satır ekrana sığsın diye biraz küçülür */
@media (orientation: landscape) and (max-height: 520px) {
  .kart-izgara { --sutun: 5; --ara: .45rem; max-width: 128vh; margin-left: auto; margin-right: auto; width: 100%; }
  .ck { padding: .25rem .25rem .3rem; border-radius: .7rem; border-width: 2px; }
  .ck .f { aspect-ratio: 1; border-radius: .5rem; }
  .ck .ad { font-size: .78rem; min-height: 2.3em; padding: .1rem 0 0; }
  .ck .no { width: 1.4rem; height: 1.4rem; font-size: .75rem; top: .25rem; right: .25rem; border-width: 2px; }
  .ck .et { font-size: .58rem; padding: .1rem .35rem; bottom: -.55rem; }
  .ck.arka .nota { font-size: 1.8rem; }
  .oyun-ic { gap: .6rem; }
  .bas { flex-direction: row; min-height: 0; gap: .8rem; }
  .yonerge { font-size: 1.05rem; } .yonerge small { font-size: .78rem; }
  .halka { width: 3rem; height: 3rem; } .halka span { width: 2.35rem; height: 2.35rem; font-size: 1rem; }
  .ust-bar { padding-bottom: .5rem; margin-bottom: .6rem; }
  .mobil-skor .skor { padding: .25rem .4rem; min-height: 0; gap: 0; }
  .mobil-skor .skor-deger { font-size: 1.3rem; }
  .mod-izgara { grid-template-columns: repeat(4, 1fr); }
  .mod-izgara .mod-sunum { order: 4; }   /* 1x4: Egzersiz, Bireysel, 2 Takımlı, Öğretmen */
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Büyütme penceresi ---------- */
.buyut-pencere { max-width: min(46rem, 96vw); gap: .8rem; }
.buyut-pencere h3 { font-size: 1.5rem; }
.buyut-alt { color: var(--soluk); font-weight: 700; margin-top: -.4rem; }
.buyut-sahne {
  position: relative; width: 100%; aspect-ratio: 1; max-height: 62vh; margin: 0 auto; overflow: hidden;
  border-radius: 1.1rem; background: var(--kart-zemin); touch-action: none; cursor: zoom-in;
}
.buyut-sahne.yakin { cursor: grab; }
.buyut-sahne.yakin:active { cursor: grabbing; }
.buyut-sahne img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; transition: transform .08s linear; pointer-events: none; }
.buyut-araclar { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.buyut-dugme { width: 2.8rem; height: 2.8rem; border-radius: .9rem; background: var(--cip); border: 2px solid var(--kenar); font-size: 1.5rem; font-weight: 900; }
.buyut-dugme:hover, .buyut-sifirla:hover { background: var(--cip-uzeri); }
.buyut-oran { min-width: 4.2rem; text-align: center; font-weight: 900; }
.buyut-sifirla { padding: .7rem 1.1rem; border-radius: .9rem; background: var(--cip); border: 2px solid var(--kenar); font-weight: 800; }
.buyut-ipucu { text-align: center; font-size: .8rem; color: var(--soluk); }
.buyut-tam-cik { display: none; position: absolute; top: .8rem; right: .8rem; z-index: 2; padding: .6rem 1rem; border-radius: .9rem; background: rgba(2, 6, 23, .85); color: #fff; font-weight: 800; border: 1px solid #334155; }
.buyut-sahne.tam, .buyut-sahne.gercek-tam, .buyut-sahne:fullscreen { position: fixed; inset: 0; z-index: 300; width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border-radius: 0; margin: 0; }
.buyut-sahne.tam .buyut-tam-cik, .buyut-sahne.gercek-tam .buyut-tam-cik, .buyut-sahne:fullscreen .buyut-tam-cik { display: block; }

/* ---------- Telefon yatay: kartlar her zaman satırda 5 (5-5 dizilim) ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  .kart-izgara { --sutun: 5; --ara: .4rem; }
  .kart-izgara > .ck { max-width: 9.5rem; }
  .kart-izgara { max-width: calc(5 * 9.5rem + 4 * .4rem); margin-left: auto; margin-right: auto; width: 100%; }
  .ck { padding: .2rem .2rem .25rem; border-radius: .65rem; border-width: 2px; }
  .ck .f { aspect-ratio: 1; border-radius: .5rem; }
  .ck .ad { font-size: .74rem; min-height: 2.3em; padding: .1rem 0 0; }
  .ck .no { width: 1.3rem; height: 1.3rem; font-size: .7rem; top: .25rem; right: .25rem; }
  .ck .et { font-size: .56rem; padding: .1rem .35rem; bottom: -.55rem; }
  .ck.arka .nota { font-size: 1.8rem; }
  .bas { flex-direction: row; min-height: 0; }
  .yonerge { font-size: 1.05rem; }
  .yonerge small { font-size: .78rem; }
}

/* ---------- Ayarlar: otomatik geçiş ---------- */
.ayar-satir { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border-radius: 1rem; background: var(--acik); border: 1px solid var(--kenar); }
.ayar-yazi { display: flex; flex-direction: column; gap: .2rem; }
.ayar-baslik { font-weight: 900; font-size: 1rem; }
.ayar-aciklama { font-size: .8rem; color: var(--soluk); line-height: 1.35; }
.anahtar { position: relative; flex: 0 0 auto; width: 3.4rem; height: 1.9rem; cursor: pointer; }
.anahtar input { position: absolute; opacity: 0; width: 0; height: 0; }
.anahtar-iz { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.anahtar-iz::before { content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.anahtar input:checked + .anahtar-iz { background: var(--p1); }
.anahtar input:checked + .anahtar-iz::before { transform: translateX(1.5rem); }
.anahtar input:focus-visible + .anahtar-iz { outline: 3px solid rgba(16, 185, 129, .4); outline-offset: 2px; }
.ayar-sayac { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.ayar-pm { width: 2.3rem; height: 2.3rem; border-radius: .75rem; background: var(--cip); border: 2px solid var(--kenar); font-size: 1.3rem; font-weight: 900; color: var(--metin); }
.ayar-pm:hover { background: var(--cip-uzeri); }
.ayar-deger { min-width: 3.4rem; text-align: center; font-weight: 900; font-size: 1.05rem; }

/* kategori penceresinde künye */
.pencere-kunye { font-size: .9rem; padding: .6rem 1rem; gap: .25rem; align-self: stretch; text-align: center; }

/* Öğretmen (sunum) modu: çalgılar arasındaki gerçek boy farkı (keman ailesi). Resim alttan hizalı küçülür. */
.sunum-izgara .ck.boylu img { transform: scale(var(--boy, 1)); transform-origin: 50% 90%; }
