/* SATRANÇ — tema A "Kütüphane": koyu ahşap + altın, çuha yeşili masa, düz 2B tahta. Canlandırmalar yalnız transform / opacity. */
:root {
  --zemin: #120c08; --zemin2: #1b120b; --panel: rgba(26, 17, 11, .86); --panel-kenar: rgba(214, 170, 104, .28);
  --altin: #e6b765; --altin2: #d19c48; --altin-koyu: #9a6a26; --krem: #f6ead5; --krem2: #cdbda2; --soluk: #a8977d;
  --yesil: #5fd08a; --kirmizi: #ef6b61; --cuha: #17382a; --cuha2: #0d2219;
  --kare-acik: #ecd3a3; --kare-koyu: #9c5d36; --cerceve: #4a2814; --cerceve2: #331a0c;
  --yazi: "Sc Poppins", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --baslik: "Sc Barlow", "Barlow Condensed", "Arial Narrow", "Sc Poppins", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--zemin); color: var(--krem); font-family: var(--yazi); font-size: 14px; line-height: 1.35; overflow: hidden; -webkit-font-smoothing: antialiased; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; user-select: none; -webkit-user-select: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg.para { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: #8a5a14; stroke-width: 2; vertical-align: -.2em; }
svg.para circle:first-child { fill: var(--altin); }
svg.para circle:last-child { fill: #f3d08a; stroke: #b98630; stroke-width: 1.4; }

/* ------------------------------------------------------------ yükleme ekranı (yazı titremez: sabit genişlikli sayı, yer değiştirmez) */
.yukle { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% 20%, #2a1a0f 0%, #140d08 62%); transition: opacity .35s ease; }
.yukle.bitti { opacity: 0; pointer-events: none; }
.yk-ic { width: min(300px, 78vw); text-align: center; }
.yk-tas { width: 84px; height: 84px; --td: #fbf3e3; --tg: #e6d6ba; --tk: #3b2619; --tc: #3b2619; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.yk-ad { font-family: var(--baslik); font-weight: 700; font-size: 34px; letter-spacing: .26em; margin: 6px 0 18px .26em; color: var(--altin); height: 42px; line-height: 42px; white-space: nowrap; }
.yk-cubuk { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.yk-cubuk i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--altin2), #f4d594); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s ease; }
.yk-yazi { margin: 12px 0 0; height: 20px; line-height: 20px; color: var(--krem2); font-size: 13px; display: flex; justify-content: center; gap: 8px; white-space: nowrap; }
.yk-yazi b { display: inline-block; width: 3.2em; text-align: left; font-variant-numeric: tabular-nums; color: var(--krem); }
.yk-marka { margin: 26px 0 0; height: 18px; line-height: 18px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--soluk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ zemin: üstte bulanık kitap rafı, altta çuha */
.app { position: fixed; inset: 0; }
.fon { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* gerçekçi sahne (kütüphane + lamba ışığı + çuha masa): resim şifreli önbellekten gelir; gelene kadar aşağıdaki CSS zemini görünür */
.fon .sahne { position: absolute; inset: 0; background: var(--arka-y, none) center / cover no-repeat; opacity: 0; transition: opacity .45s ease; }
@media (max-aspect-ratio: 1/1) { .fon .sahne { background-image: var(--arka-d, none); } }
.fon.hazir .sahne { opacity: 1; }
.fon.hazir .raf, .fon.hazir .cuha { display: none; }
body[data-gorunum="salon"] .fon.hazir .sahne { opacity: .3; }
.efekt { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 39; pointer-events: none; display: none; }
.fon .raf { position: absolute; left: -4%; right: -4%; top: -30px; height: 190px; opacity: .5; filter: blur(7px);
  background:
    linear-gradient(180deg, rgba(18, 12, 8, 0) 0, rgba(18, 12, 8, .2) 60%, rgba(18, 12, 8, .95) 100%),
    repeating-linear-gradient(90deg, #6b3a22 0 14px, #2a160d 14px 16px, #8a6a2f 16px 27px, #2a160d 27px 29px, #3f5a4a 29px 43px, #2a160d 43px 45px, #7a3b2a 45px 55px, #2a160d 55px 57px, #a58045 57px 74px, #2a160d 74px 76px, #4b3a5c 76px 88px, #2a160d 88px 90px, #5c4a2c 90px 108px, #2a160d 108px 110px);
}
.fon .cuha { position: absolute; left: 0; right: 0; top: 120px; bottom: 0; background: radial-gradient(90% 80% at 50% 40%, #1f4a36 0%, var(--cuha) 45%, var(--cuha2) 100%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 70px); mask-image: linear-gradient(180deg, transparent 0, #000 70px); }
body[data-gorunum="salon"] .fon .cuha { display: none; }
body[data-gorunum="salon"] .fon .raf { opacity: .16; }

/* ------------------------------------------------------------ düğmeler / haplar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; transition: transform .12s ease, opacity .15s ease; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.altin { background: linear-gradient(180deg, #f0c675, #dfa955); color: #2a1a0b; border-color: #f6d898; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.btn.koyu { background: rgba(34, 23, 15, .92); color: var(--krem); border-color: var(--panel-kenar); }
.btn.kirmizi { background: linear-gradient(180deg, #e2685c, #c24b40); color: #fff; border-color: #f09a90; }
.btn.buyuk { min-height: 54px; font-size: 16px; }
.btn.genis { font-family: var(--baslik); font-weight: 700; letter-spacing: .14em; font-size: 16px; padding: 0 22px; }
.hap { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 18px; background: rgba(24, 16, 10, .9); border: 1px solid var(--panel-kenar); font-family: var(--baslik); font-weight: 600; letter-spacing: .14em; font-size: 13px; color: var(--krem2); white-space: nowrap; }
.hap b { color: var(--krem); font-size: 17px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.hap.rozet i { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--altin); color: #2a1a0b; font-style: normal; font-weight: 700; letter-spacing: 0; font-size: 14px; margin-left: -6px; }
.ikon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(24, 16, 10, .9); border: 1px solid var(--panel-kenar); color: var(--krem); padding: 0; transition: transform .12s ease; }
.ikon:active { transform: scale(.94); }
.ikon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ikon .ses-kapali, .ikon.kapali .ses-acik { display: none; }
.ikon.kapali .ses-kapali { display: block; }

/* ------------------------------------------------------------ SALON */
.salon { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 22px max(16px, calc((100% - 1280px) / 2)) 40px; }
.sl-kahraman { position: relative; display: flex; align-items: center; gap: 24px; padding: 34px 36px; border-radius: 22px; background: linear-gradient(120deg, #2a1a10 0%, #20140c 55%, #26170d 100%); border: 1px solid var(--panel-kenar); overflow: hidden; }
.sl-raf { position: absolute; right: 0; top: 18%; width: 52%; height: 40%; opacity: .2; filter: blur(3px);
  background: repeating-linear-gradient(90deg, #8a4a2a 0 12px, transparent 12px 15px, #a58045 15px 24px, transparent 24px 27px, #3f6a55 27px 40px, transparent 40px 43px, #7a3b2a 43px 52px, transparent 52px 55px, #b9933f 55px 70px, transparent 70px 73px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }
.sl-kahraman::after { content: ""; position: absolute; left: 42%; top: -40%; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(190, 96, 52, .26), transparent 70%); pointer-events: none; }
.sl-yazi { position: relative; flex: 1; min-width: 0; z-index: 1; }
.sl-yazi small { font-family: var(--baslik); font-weight: 700; letter-spacing: .26em; color: var(--altin); font-size: 14px; }
.sl-yazi h1 { margin: 10px 0 8px; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.2; font-weight: 700; }
.sl-yazi p { margin: 0; color: var(--soluk); font-size: 15px; }
.sl-dugme { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; width: min(310px, 34%); flex: none; }
.sl-dugme .btn { width: 100%; }
.sl-bas { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 2px 14px; }
.sl-bas h2 { margin: 0; font-family: var(--baslik); font-weight: 700; letter-spacing: .2em; font-size: 22px; color: var(--altin); white-space: nowrap; }
.sl-canli { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 20px; background: rgba(24, 16, 10, .9); border: 1px solid var(--panel-kenar); font-weight: 700; font-size: 13px; white-space: nowrap; }
.sl-canli i { width: 9px; height: 9px; border-radius: 50%; background: var(--yesil); box-shadow: 0 0 0 4px rgba(95, 208, 138, .18); margin-right: 4px; }
.sl-canli b { font-variant-numeric: tabular-nums; }
.sl-suzgec { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.sl-suzgec::-webkit-scrollbar { display: none; }
.sz { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px; border-radius: 22px; background: rgba(28, 19, 12, .92); border: 1px solid var(--panel-kenar); color: var(--krem2); font-weight: 700; font-size: 14px; }
.sz b { display: inline-flex; min-width: 24px; height: 22px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 11px; background: rgba(255, 255, 255, .08); font-size: 12px; font-variant-numeric: tabular-nums; }
.sz.secili { background: linear-gradient(180deg, #f0c675, #dfa955); color: #2a1a0b; border-color: #f6d898; }
.sz.secili b { background: rgba(60, 36, 10, .22); }
.sz-ayrac { flex: none; width: 1px; height: 30px; background: var(--panel-kenar); margin: 0 4px; }
.sl-izgara { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.sl-bos { text-align: center; color: var(--soluk); padding: 40px 0; }
.mk { position: relative; display: flex; flex-direction: column; padding: 16px 16px 14px; border-radius: 18px; background: linear-gradient(160deg, #24170e, #1a110a); border: 1px solid rgba(214, 170, 104, .16); contain: layout paint; }
.mk.acik { border-color: rgba(230, 183, 101, .75); box-shadow: 0 0 0 1px rgba(230, 183, 101, .3) inset; }
.mk header { display: flex; align-items: center; justify-content: space-between; }
.mk-no { font-family: var(--baslik); font-weight: 700; letter-spacing: .08em; font-size: 16px; color: var(--krem2); }
.mk-dolu { display: inline-flex; height: 24px; padding: 0 10px; align-items: center; border-radius: 12px; background: var(--altin); color: #2a1a0b; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.mk-orta { display: flex; align-items: center; justify-content: center; gap: 0; margin: 6px 0 10px; }
.mk-tahta { flex: none; width: 58%; max-width: 232px; aspect-ratio: 1; border-radius: 8px; background: #4a2814; box-shadow: 0 8px 18px rgba(0, 0, 0, .4); position: relative; z-index: 0; }
.mk-tahta img { display: block; width: 100%; height: 100%; border-radius: 8px; }
.mk-oy { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 -14px; }
.mk-oy span:last-child { max-width: 100%; padding: 0 4px; font-size: 12.5px; font-weight: 700; color: var(--krem2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-oy.ben span:last-child { color: var(--altin); }
.av { display: block; width: 58px; height: 58px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px #1a110a, 0 0 0 5px rgba(214, 170, 104, .7); }
.av.bos { display: flex; align-items: center; justify-content: center; background: #2a1c12; box-shadow: 0 0 0 3px #1a110a, 0 0 0 5px rgba(214, 170, 104, .3); border: 2px dashed rgba(214, 170, 104, .5); }
.av.bos svg { width: 24px; height: 24px; fill: none; stroke: var(--altin); stroke-width: 2.2; stroke-linecap: round; }
.mk footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.mk-giris { display: inline-flex; align-items: center; gap: 6px; font-family: var(--baslik); font-weight: 700; font-size: 16px; letter-spacing: .04em; white-space: nowrap; }
.mk-giris .mk-tutar { color: var(--altin); font-size: 19px; font-variant-numeric: tabular-nums; }
.mk-otur { min-height: 42px; padding: 0 20px; }
.mk-durum { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.mk-durum i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mk-durum.yesil { color: var(--yesil); background: rgba(95, 208, 138, .12); }
.mk-durum.kirmizi { color: var(--kirmizi); background: rgba(239, 107, 97, .12); }
.mk-durum b { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ MASA */
.masa { --ust: 96px; --yan: clamp(210px, 22vw, 300px); --bosluk: 18px;
  --tahta: min(calc(100vh - var(--ust) - 2 * var(--bosluk) - 8px), calc(100vw - 2 * var(--yan) - 4 * var(--bosluk)));
  position: absolute; inset: 0; display: grid; grid-template-columns: var(--yan) 1fr var(--yan); grid-template-rows: var(--ust) auto 1fr auto auto;
  grid-template-areas: "ust ust ust" "rakip tahta sus2" ". tahta ." "ipucu tahta ." "ben tahta dugme"; column-gap: var(--bosluk); padding: 0 var(--bosluk) var(--bosluk); }
@supports (height: 100dvh) { .masa { --tahta: min(calc(100dvh - var(--ust) - 2 * var(--bosluk) - 8px), calc(100vw - 2 * var(--yan) - 4 * var(--bosluk))); } }
.ms-ust { grid-area: ust; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; padding-top: 12px; }
.ms-sol { justify-self: start; padding-top: 4px; }
.ms-sag { justify-self: end; display: flex; gap: 10px; padding-top: 2px; }
.ms-orta { text-align: center; }
.ms-baslik { font-family: var(--baslik); font-weight: 700; font-size: 30px; line-height: 34px; letter-spacing: .26em; margin-left: .26em; color: var(--altin); text-shadow: 0 2px 10px rgba(0, 0, 0, .5); white-space: nowrap; }
.ms-haplar { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.ms-kart { position: relative; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid rgba(214, 170, 104, .2); }
.ms-kart.rakip { grid-area: rakip; align-self: start; }
.ms-kart.ben { grid-area: ben; align-self: end; }
.ms-kart.sira { border-color: var(--altin); box-shadow: 0 0 0 1px rgba(230, 183, 101, .45), 0 8px 26px rgba(0, 0, 0, .35); }
.kt-av { position: relative; width: 52px; height: 52px; flex: none; }
.kt-av .av { width: 44px; height: 44px; margin: 4px; box-shadow: none; }
.kt-av .av.bos { width: 44px; height: 44px; }
.kt-av .halka { position: absolute; inset: 0; width: 52px; height: 52px; transform: rotate(-90deg); }
.halka circle { fill: none; stroke-width: 3.6; }
.halka .iz { stroke: rgba(214, 170, 104, .25); }
.halka .dolu { stroke: var(--altin); stroke-linecap: round; stroke-dasharray: 135.1; stroke-dashoffset: 135.1; opacity: 0; transition: stroke-dashoffset 1s linear; }
.ms-kart.sira .halka .dolu { opacity: 1; }
.kt-yazi { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kt-yazi b { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-yazi em { font-style: normal; color: var(--krem2); font-weight: 500; }
.kt-yazi small { font-size: 12.5px; color: var(--krem2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(255, 255, 255, .25); }
.rk.beyaz { background: #f3e9d6; }
.rk.siyah { background: #1d1613; }
.kt-sure { position: absolute; right: -8px; top: -12px; min-width: 38px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: linear-gradient(180deg, #f0c675, #dfa955); color: #2a1a0b; font-family: var(--baslik); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.kt-sure.az { background: linear-gradient(180deg, #f28b7f, #d9564a); color: #fff; }
.ms-ipucu { grid-area: ipucu; align-self: end; min-height: 40px; margin-bottom: 14px; }
.ms-ipucu span { display: inline-block; max-width: 100%; padding: 9px 16px; border-radius: 20px; background: rgba(20, 13, 8, .92); border: 1px solid var(--panel-kenar); font-weight: 700; font-size: 13.5px; }
.ms-ipucu b { color: var(--altin); }
.ms-dugme { grid-area: dugme; align-self: end; display: flex; gap: 12px; justify-content: flex-end; }
.ms-dugme .btn { min-height: 50px; flex: 1; max-width: 170px; }
.ms-sus { position: absolute; pointer-events: none; }
.ms-sus.kitap { left: calc(var(--bosluk) + 50px); bottom: calc(var(--bosluk) + 150px); width: 140px; opacity: .92; }
.ms-sus.fincan { right: calc(var(--bosluk) + 40px); bottom: calc(var(--bosluk) + 86px); width: 130px; }
.ms-tahta-kap { grid-area: tahta; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.tahta-cerceve { position: relative; width: var(--tahta); height: var(--tahta); flex: none; padding: 5.2%; border-radius: 2.6%;
  background: repeating-linear-gradient(92deg, rgba(0, 0, 0, .07) 0 3px, rgba(255, 255, 255, .025) 3px 7px, rgba(0, 0, 0, .05) 7px 12px), linear-gradient(180deg, #5a3118, var(--cerceve) 40%, var(--cerceve2));
  box-shadow: 0 0 0 2px rgba(214, 170, 104, .55) inset, 0 0 0 3px #2a1509, 0 24px 50px rgba(0, 0, 0, .55); }
.tahta { position: relative; width: 100%; height: 100%; touch-action: none; box-shadow: 0 0 0 3px #2a1509; }
.kareler { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.kare { position: relative; }
.kare.acik { background-color: var(--kare-acik); background-image: repeating-linear-gradient(88deg, rgba(160, 110, 50, .09) 0 2px, transparent 2px 9px); }
.kare.koyu { background-color: var(--kare-koyu); background-image: repeating-linear-gradient(88deg, rgba(60, 25, 5, .12) 0 2px, transparent 2px 9px); }
.kare i { position: absolute; inset: 0; opacity: 0; }
.kare.son i { opacity: 1; background: rgba(240, 190, 90, .36); }
.kare.secili i { opacity: 1; background: rgba(240, 190, 90, .58); }
.kare.sah i { opacity: 1; background: radial-gradient(circle, rgba(232, 72, 56, .92) 0, rgba(232, 72, 56, .5) 45%, rgba(232, 72, 56, 0) 72%); }
.kare.hedef::after { content: ""; position: absolute; left: 34%; top: 34%; width: 32%; height: 32%; border-radius: 50%; background: #d9a55c; box-shadow: 0 0 0 2px rgba(120, 70, 20, .55) inset, 0 1px 3px rgba(0, 0, 0, .3); }
.kare.hedef.al::after { left: 6%; top: 6%; width: 88%; height: 88%; background: transparent; box-shadow: 0 0 0 5px rgba(217, 165, 92, .95) inset; }
.tahta.etkin .kare.hedef { cursor: pointer; }
.taslar { position: absolute; inset: 0; pointer-events: none; }
.tas { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; will-change: transform; }
.taslar.akici .tas { transition: transform .28s cubic-bezier(.3, .7, .3, 1), opacity .24s ease; }
.tas svg { display: block; width: 88%; height: 88%; margin: 6% 6% 0; filter: drop-shadow(0 2px 1.5px rgba(40, 20, 5, .38)); }
.tas.b { --td: #fbf3e3; --tg: #e6d6ba; --tk: #3b2619; --tc: #3b2619; }
.tas.s { --td: #3a302b; --tg: #221b18; --tk: #120c0a; --tc: #e9dcc5; }
.tas.secili { z-index: 3; }
.tas.surukleniyor { z-index: 5; transition: none !important; }
.tas.sonuyor { opacity: 0; }
.terfi-perde { position: absolute; inset: 0; background: rgba(10, 6, 3, .45); z-index: 6; }
.terfi { position: absolute; left: 0; width: 12.5%; z-index: 7; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; background: #f6ead5; box-shadow: 0 10px 26px rgba(0, 0, 0, .55), 0 0 0 2px var(--altin); }
.terfi.ust { top: 0; }
.terfi.alt { bottom: 0; flex-direction: column-reverse; }
.terfi .tas { position: static; width: 100%; height: auto; aspect-ratio: 1; border: 0; padding: 0; background: transparent; }
.terfi .tas:hover, .terfi .tas:focus-visible { background: rgba(214, 160, 70, .4); outline: none; }
.koord { position: absolute; inset: 5.2%; pointer-events: none; font-family: var(--baslik); font-weight: 600; color: rgba(246, 234, 213, .82); font-size: calc(var(--tahta) * .026); }
.koord i { position: absolute; font-style: normal; line-height: 1; }
.koord .sr { left: calc(var(--tahta) * -.033); transform: translateY(-50%); }
.koord .st { bottom: calc(var(--tahta) * -.04); transform: translateX(-50%); }
.tahta-ortu { position: absolute; inset: 5.2%; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(14, 9, 5, .62); }
.ortu-kutu { width: min(86%, 340px); padding: 22px 20px; border-radius: 18px; text-align: center; background: rgba(26, 17, 11, .96); border: 1px solid var(--panel-kenar); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.ortu-kutu h3 { margin: 6px 0 6px; font-size: 18px; }
.ortu-kutu p { margin: 0 0 14px; color: var(--krem2); font-size: 13px; }
.ortu-sayi { font-family: var(--baslik); font-weight: 700; font-size: 64px; line-height: 70px; height: 70px; color: var(--altin); font-variant-numeric: tabular-nums; }
.donen { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(230, 183, 101, .25); border-top-color: var(--altin); animation: don 0.9s linear infinite; }
@keyframes don { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ pencere / bildirim */
.perde { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 5, 3, .66); opacity: 0; transition: opacity .18s ease; }
.perde.acik { opacity: 1; }
.pencere { width: min(420px, 100%); max-height: 100%; overflow-y: auto; padding: 22px 20px 18px; border-radius: 20px; background: linear-gradient(170deg, #2a1b10, #1c120b); border: 1px solid rgba(230, 183, 101, .5); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); transform: translateY(10px) scale(.98); transition: transform .18s ease; }
.perde.acik .pencere { transform: none; }
.pencere h3 { margin: 0 0 12px; font-size: 18px; line-height: 1.3; text-align: center; }
.pencere.kucuk { width: min(360px, 100%); }
.pn-dugme { display: flex; gap: 10px; margin-top: 16px; }
.pn-dugme .btn { flex: 1; min-width: 0; }
.pn-not { margin: 12px 0 0; color: var(--soluk); font-size: 12.5px; text-align: center; }
.pn-masa { margin: -6px 0 10px; text-align: center; font-family: var(--baslik); font-weight: 700; letter-spacing: .1em; font-size: 18px; color: var(--altin); }
.pn-tutar label { display: block; font-size: 12px; color: var(--krem2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.pn-giris { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--panel-kenar); font-size: 22px; }
.pn-giris input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; font-family: var(--baslik); font-weight: 700; font-size: 28px; letter-spacing: .04em; color: var(--krem); user-select: text; -webkit-user-select: text; }
.pn-tutar small { display: block; margin-top: 6px; color: var(--soluk); font-size: 12px; }
.pn-hizli { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cip { flex: 1 0 28%; min-height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--panel-kenar); font-family: var(--baslik); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.cip.secili { background: rgba(230, 183, 101, .2); border-color: var(--altin); color: var(--altin); }
.pn-ozet { margin: 14px 0 0; padding: 4px 14px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(214, 170, 104, .16); }
.pn-ozet div { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 36px; border-bottom: 1px solid rgba(214, 170, 104, .1); }
.pn-ozet div:last-child { border-bottom: 0; }
.pn-ozet dt { color: var(--krem2); font-size: 13px; }
.pn-ozet dd { margin: 0; font-family: var(--baslik); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
.pn-ozet .vurgu dd { color: var(--altin); font-size: 22px; }
.arti { color: var(--yesil); }
.eksi { color: var(--kirmizi); }
.pencere.sonuc { text-align: center; width: min(380px, 100%); }
.sn-rozet { width: 84px; height: 84px; margin: 0 auto 6px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #3a2616, #1c120b); border: 2px solid var(--altin); --td: #fbf3e3; --tg: #e6d6ba; --tk: #3b2619; --tc: #3b2619; }
.sn-rozet.kaybettin { border-color: rgba(239, 107, 97, .7); --td: #3a302b; --tg: #221b18; --tk: #120c0a; --tc: #e9dcc5; }
.sn-rozet.berabere, .sn-rozet.iptal { border-color: rgba(214, 170, 104, .45); }
.sn-rozet svg { width: 58px; height: 58px; }
.sn-baslik { font-family: var(--baslik); font-weight: 700; font-size: 34px !important; letter-spacing: .06em; margin-bottom: 2px !important; }
.sn-baslik.kazandin { color: var(--altin); }
.sn-baslik.kaybettin { color: var(--kirmizi); }
.sn-neden { margin: 0 0 12px; color: var(--krem2); }
.sn-para { display: inline-flex; flex-direction: column; gap: 2px; padding: 10px 26px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(214, 170, 104, .2); }
.sn-para small { color: var(--krem2); font-size: 12px; }
.sn-para b { font-family: var(--baslik); font-weight: 700; font-size: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-variant-numeric: tabular-nums; }
.sn-geri { margin: 14px 0 0; height: 20px; color: var(--soluk); font-size: 13px; font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: rgba(26, 17, 11, .97); border: 1px solid var(--panel-kenar); font-weight: 700; font-size: 13.5px; text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); transform: translate(-50%, 16px); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.toast.acik { transform: translate(-50%, 0); opacity: 1; }
.toast.hata { border-color: rgba(239, 107, 97, .7); }
.toast.uyari { border-color: var(--altin); }
.baglanti { position: fixed; left: 50%; top: 10px; z-index: 55; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 20px; background: rgba(26, 17, 11, .97); border: 1px solid rgba(239, 107, 97, .6); font-size: 12.5px; white-space: nowrap; }
.baglanti .donen { width: 16px; height: 16px; border-width: 2px; }

/* ------------------------------------------------------------ dar / dikey ekran (telefon, dikey tablet): tek sütun */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .masa { --ust: auto; --bosluk: 10px; --tahta: min(calc(100vw - 2 * var(--bosluk)), calc(100vh - 358px), 720px);
    grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto auto 1fr; grid-template-areas: "ust" "rakip" "tahta" "ipucu" "ben" "dugme" "."; row-gap: 8px; padding: 0 var(--bosluk) var(--bosluk); overflow-y: auto; overflow-x: hidden; justify-items: center; }
  @supports (height: 100dvh) { .masa { --tahta: min(calc(100vw - 2 * var(--bosluk)), calc(100dvh - 358px), 720px); } }
  .masa > * { width: min(100%, max(var(--tahta), 300px)); }
  .ms-ust { grid-template-columns: auto 1fr; grid-template-areas: "sol sag" "orta orta"; padding-top: 8px; row-gap: 2px; }
  .ms-sol { grid-area: sol; padding-top: 4px; }
  .ms-sag { grid-area: sag; gap: 6px; }
  .ms-orta { grid-area: orta; }
  .ikon { width: 36px; height: 36px; }
  .ikon svg { width: 18px; height: 18px; }
  .hap { height: 30px; font-size: 11.5px; padding: 0 11px; gap: 6px; }
  .hap b { font-size: 15px; }
  .ms-baslik { font-size: 22px; line-height: 26px; }
  .ms-haplar { margin-top: 4px; gap: 6px; }
  .ms-kart { min-height: 56px; padding: 6px 12px; border-radius: 14px; }
  .kt-av { width: 44px; height: 44px; }
  .kt-av .av, .kt-av .av.bos { width: 36px; height: 36px; }
  .kt-av .halka { width: 44px; height: 44px; }
  .kt-yazi b { font-size: 14.5px; }
  .kt-yazi small { font-size: 12px; }
  .kt-sure { right: 6px; top: -9px; height: 24px; min-width: 34px; font-size: 16px; }
  .ms-ipucu { min-height: 0; margin: 6px 0 0; text-align: center; }
  .ms-ipucu span { font-size: 12px; padding: 6px 12px; }
  .ms-ipucu:empty { display: none; }
  .ms-dugme { justify-content: stretch; }
  .ms-dugme .btn { max-width: none; min-height: 44px; font-size: 14px; }
  .ms-sus { display: none; }
  .ms-tahta-kap { width: 100%; }
  .tahta-cerceve { padding: 4.4%; }
  .koord { inset: 4.4%; }
  .koord .sr { left: calc(var(--tahta) * -.03); }
  .koord .st { bottom: calc(var(--tahta) * -.036); }
  .tahta-ortu { inset: 4.4%; }
  .ortu-kutu { padding: 14px 14px; }
  .ortu-sayi { font-size: 48px; line-height: 52px; height: 52px; }
  .salon { padding: 12px 12px 28px; }
  .sl-kahraman { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 18px; border-radius: 18px; }
  .sl-dugme { width: 100%; }
  .sl-yazi small { font-size: 12px; }
  .sl-yazi p { font-size: 13px; }
  .sl-bas { margin: 20px 2px 10px; }
  .sl-bas h2 { font-size: 18px; letter-spacing: .16em; }
  .sl-canli { height: 32px; padding: 0 12px; font-size: 11.5px; }
  .sz { height: 36px; padding: 0 14px; font-size: 13px; gap: 8px; }
  .sl-izgara { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mk { padding: 10px 10px 10px; border-radius: 14px; }
  .mk-no { font-size: 14px; }
  .mk-dolu { height: 21px; padding: 0 8px; font-size: 11px; }
  .mk-orta { margin: 6px 0 6px; }
  .mk-tahta { width: 56%; }
  .mk-oy { margin: 0 -10px; gap: 3px; }
  .mk-oy span:last-child { font-size: 10.5px; }
  .av { width: 36px; height: 36px; box-shadow: 0 0 0 2px #1a110a, 0 0 0 3.5px rgba(214, 170, 104, .7); }
  .av.bos { box-shadow: 0 0 0 2px #1a110a; }
  .av.bos svg { width: 16px; height: 16px; }
  .mk footer { flex-direction: column; align-items: stretch; gap: 6px; min-height: 0; }
  .mk-giris { justify-content: center; font-size: 14px; }
  .mk-giris .mk-tutar { font-size: 16px; }
  .mk-otur { min-height: 38px; width: 100%; }
  .mk-durum { justify-content: center; height: 30px; font-size: 12px; }
}
@media (max-width: 360px) {
  .ms-baslik { font-size: 19px; letter-spacing: .2em; }
  .hap { font-size: 10.5px; padding: 0 9px; letter-spacing: .1em; }
  .sl-bas h2 { font-size: 16px; letter-spacing: .1em; }
  .sl-canli { padding: 0 9px; font-size: 10.5px; }
  .sl-yazi h1 { font-size: 19px; }
  .btn.genis { letter-spacing: .08em; padding: 0 10px; }
  .mk-giris { font-size: 13px; }
}
/* kısa dikey ekran (küçük telefon, ör. 320×568): başlık yazısı gizlenir, kartlar sıkışır → tahta büyür, sayfa kaymaz */
@media (max-width: 900px) and (max-height: 640px) and (orientation: portrait) {
  .masa { --tahta: min(calc(100vw - 2 * var(--bosluk)), calc(100vh - 306px), 720px); row-gap: 6px; }
  @supports (height: 100dvh) { .masa { --tahta: min(calc(100vw - 2 * var(--bosluk)), calc(100dvh - 306px), 720px); } }
  .ms-baslik { display: none; }
  .ms-haplar { margin-top: 0; }
  .ms-kart { min-height: 46px; padding: 4px 10px; }
  .kt-av, .kt-av .halka { width: 38px; height: 38px; }
  .kt-av .av, .kt-av .av.bos { width: 30px; height: 30px; }
  .ms-ipucu { height: 38px; display: flex; align-items: center; justify-content: center; }   /* iki satırlık sabit yer: uzun EN / MT ipucu düzeni itmez */
  .ms-ipucu span { font-size: 10.5px; line-height: 1.25; padding: 4px 10px; max-height: 38px; overflow: hidden; }
  .kt-sure { top: 50%; right: 10px; margin-top: -12px; }   /* süre rozeti kartın içinde (ipucuna binmez) */
  .ms-dugme .btn { min-height: 40px; }
}
/* salon başlığı: "canlı" hapı dar ekranda (uzun çeviri) alt satıra iner, taşmaz */
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .sl-bas { flex-wrap: wrap; row-gap: 8px; } .sl-canli { max-width: 100%; } }
/* kısa ekranda onay pencereleri sıkışır: düğmeler kaydırmadan görünür (320×568); çok kısa ekranda (yatay telefon) düğmeler altta sabit kalır */
@media (max-height: 640px) {
  .perde { padding: 8px; }
  .pencere { padding: 14px 14px 12px; }
  .pencere h3 { margin-bottom: 8px; font-size: 16px; }
  .pn-giris { height: 44px; }
  .pn-giris input { font-size: 24px; }
  .pn-tutar small { margin-top: 4px; font-size: 11px; }
  .pn-hizli { gap: 6px; margin: 8px 0 2px; }
  .cip { min-height: 32px; font-size: 15px; }
  .pn-ozet { margin-top: 8px; padding: 2px 12px; }
  .pn-ozet div { min-height: 28px; }
  .pn-ozet dd { font-size: 16px; }
  .pn-ozet .vurgu dd { font-size: 18px; }
  .pn-not { margin-top: 8px; font-size: 11px; }
  .pn-dugme { margin-top: 10px; }
  .pn-dugme .btn { min-height: 40px; }
}
@media (max-height: 520px) { .pencere.onay .pn-dugme { position: sticky; bottom: -12px; margin: 10px -14px -12px; padding: 8px 14px 12px; background: #1c120b; box-shadow: 0 -10px 14px -6px rgba(0, 0, 0, .55); } }
/* kısa yatay ekran (telefon yatay): üst bant ve yan sütun daralır */
@media (min-width: 901px) and (max-height: 620px), (orientation: landscape) and (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .masa { --ust: 64px; --yan: clamp(170px, 24vw, 240px); --bosluk: 10px; grid-template-columns: var(--yan) 1fr var(--yan); grid-template-rows: var(--ust) auto 1fr auto auto;
    grid-template-areas: "ust ust ust" "rakip tahta sus2" ". tahta ." "ipucu tahta ." "ben tahta dugme"; overflow: hidden; justify-items: stretch; row-gap: 0; }
  .masa > * { width: auto; }
  .ms-ust { grid-template-columns: 1fr auto 1fr; grid-template-areas: none; padding-top: 6px; }
  .ms-sol, .ms-sag, .ms-orta { grid-area: auto; }
  .ms-orta { display: flex; align-items: center; gap: 12px; }
  .ms-baslik { font-size: 22px; line-height: 30px; }
  .ms-haplar { margin-top: 0; }
  .ms-sus { display: none; }
  .ms-dugme { flex-direction: column; }
  .ms-dugme .btn { max-width: none; min-height: 40px; }
  .ms-kart { min-height: 58px; padding: 8px 10px; }
  .ms-ipucu span { font-size: 11.5px; padding: 6px 10px; }
  .tahta-cerceve { --tahta: min(calc(100vh - 64px - 20px), calc(100vw - 2 * var(--yan) - 40px)); }
}
@media (prefers-reduced-motion: reduce) { .taslar.akici .tas { transition-duration: .01s; } .donen { animation-duration: 2.4s; } }
/* geniş masaüstü: ipucu tek satır (tasarımdaki gibi tahta çerçevesine doğru uzar) */
/* ipucu balonu her genişlikte KENDİ sütununda kalır (uzun EN / MT metin satır kırar) — tahta çerçevesine taşmaz (test/kesisim.py denetler) */
.ms-ipucu { min-width: 0; } .ms-ipucu span { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 900px), (max-aspect-ratio: 1/1) { .mk-oy.bos span:last-child { white-space: normal; line-height: 1.15; font-size: 10px; text-align: center; overflow: visible; } }

/* ADIM 236 — geniş ekran (ör. 1920 × 1080): yan sütun ve oyuncu kartları büyür (231b'de "1920 px'te yan kartlar biraz küçük"); tahta boyu aynı
   (ekran yüksekliği sınırlıyor). Yalnız ölçü — renk / yerleşim aynı. */
@media (min-width: 1600px) and (min-height: 860px) {
  .masa { --yan: clamp(300px, 20vw, 390px); }
  .ms-kart { min-height: 98px; padding: 16px 20px; gap: 16px; border-radius: 18px; }
  .kt-av, .kt-av .halka { width: 66px; height: 66px; }
  .kt-av .av, .kt-av .av.bos { width: 56px; height: 56px; margin: 5px; }
  .kt-yazi { gap: 4px; }
  .kt-yazi b { font-size: 20px; }
  .kt-yazi small { font-size: 14.5px; }
  .rk { width: 13px; height: 13px; }
  .kt-sure { min-width: 48px; height: 34px; border-radius: 17px; font-size: 20px; top: -14px; }
  .ms-ipucu span { font-size: 15.5px; padding: 11px 18px; }
  .ms-dugme .btn { min-height: 58px; max-width: 210px; font-size: 17px; }
}
