/* ─────────────────────────────────────────────────────────────
   Pinguru — mobil (yalnızca 760 px altı; inc/assets.php bu dosyayı media="(max-width: 759.98px)" ile yükler)
   Üst bar, yan menü, alt sekme çubuğu, bildirim konumu ve footer (KOD_AKTARIM 95–96). Masaüstü kuralları değişmez.
   ───────────────────────────────────────────────────────────── */

/* ── Üst bar: yapışkan; ☰ · logo · bakiye/giriş, altında her zaman görünen arama ── */
.promo-bar { display: none; }
.site-header { position: sticky; top: 0; z-index: 50; }
.site-header__inner { height: 60px; gap: 10px; }
.site-header__logo img { height: 32px; }
.site-header__actions { gap: 8px; }
.site-header__search-icon, .mygames-pill, .user-menu, .user-menu__login { display: none; }
/* Alt sekme çubuğu olan sayfada sepet orada; olmayan sayfada üst barda kalır. */
body.has-tabbar .site-header__cart { display: none; }
.m-burger {
  display: grid; width: 42px; height: 42px; flex-shrink: 0; place-items: center; border-radius: 12px;
  border: 1px solid rgb(167 139 250 / .28); background: rgb(15 23 42 / .7); color: var(--ink);
  transition: border-color .2s, background-color .2s;
}
.m-burger:active, .m-burger[aria-expanded="true"] { border-color: var(--brand-light); background: rgb(124 58 237 / .18); }
.m-burger .icon { width: 20px; height: 20px; }
.m-login {
  display: inline-flex; height: 40px; align-items: center; padding-inline: 18px; border-radius: 12px;
  background: var(--brand-grad); box-shadow: 0 10px 22px -12px rgb(124 58 237 / .95); font-size: 14px; font-weight: 700; color: #fff;
}
.m-balance {
  display: flex; height: 40px; align-items: center; gap: 8px; padding: 3px 3px 3px 10px; border-radius: 999px;
  border: 1px solid rgb(167 139 250 / .35); background: rgb(124 58 237 / .12); color: var(--ink);
}
.m-balance__money { display: flex; align-items: center; gap: 6px; }
.m-balance__money .icon { width: 16px; height: 16px; color: var(--brand-light); }
.m-balance__amount { font-size: 13px; font-weight: 700; white-space: nowrap; }
.m-balance__avatar.avatar { width: 32px; height: 32px; font-size: 12px; }
.m-search { display: block; padding-bottom: 10px; }
.m-search .search-glass { height: 44px; border-radius: 12px; }
.m-search .search-glass__btn { width: 44px; }
.m-search .search__list { left: 0; right: auto; width: 100%; }

/* Dar telefonlar: üst barın sağı (sepet + bakiye hapı) sığsın, sayfa yana kaymasın. Tasarım 390 px'e göre; 390 px ve
   üstü değişmez. Sepet üst bardayken (alt sekme çubuğu olmayan sayfalar) önce cüzdan simgesi, 360 px altında tutar gizlenir
   (hap yalnız avatar olur; bakiye yan menüde ve Hesabım'da). Ana sayfada (sepet alt çubukta) 340 px altında simge, 320 px
   altında tutar gizlenir. */
@media (width < 390px) {
  body:not(.has-tabbar) .site-header__inner { gap: 8px; }
  body:not(.has-tabbar) .site-header__actions { gap: 6px; }
  body:not(.has-tabbar) .m-balance__money .icon { display: none; }
}
@media (width < 360px) {
  body:not(.has-tabbar) .m-balance { padding: 3px; }
  body:not(.has-tabbar) .m-balance__money { display: none; }
}
@media (width < 340px) {
  .m-balance__money .icon { display: none; }
}
@media (width < 320px) {
  .m-balance { padding: 3px; }
  .m-balance__money { display: none; }
}
@media (width < 300px) {
  .site-header__inner { gap: 8px; }
  .site-header__logo img { height: 28px; }
  .m-login { padding-inline: 14px; }
}
/* Son çare: beklenmedik uzunlukta tutar sayfayı kaydırmasın; hap daralır, tutar üç noktayla kısalır. */
.site-header__actions { flex-shrink: 1; }
.site-header__actions > * { flex-shrink: 0; }
.site-header__actions > .m-balance { flex-shrink: 1; min-width: 0; }
.m-balance__money { min-width: 0; }
.m-balance__amount { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ── Yan menü (min(86vw, 340px), soldan 0,28 sn) ── */
.m-drawer { position: fixed; inset: 0; z-index: 90; display: block; }
.m-drawer[hidden] { display: none; }
.m-drawer__backdrop { position: absolute; inset: 0; background: rgb(3 6 16 / .66); opacity: 0; transition: opacity .28s ease; }
.m-drawer__panel {
  position: absolute; inset: 0 auto 0 0; width: min(86vw, 340px); overflow-y: auto; overscroll-behavior: contain; outline: none;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 30% at 0% 0%, rgb(124 58 237 / .22), transparent 70%), linear-gradient(180deg, #121a36, #0b1124 45%);
  box-shadow: 1px 0 0 rgb(167 139 250 / .3), 30px 0 60px -24px rgb(0 0 0 / .9);
  transform: translateX(-100%); transition: transform .28s var(--ease-out);
}
.m-drawer.is-open .m-drawer__backdrop { opacity: 1; }
.m-drawer.is-open .m-drawer__panel { transform: none; }
.m-drawer__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-drawer__logo img { display: block; height: 30px; width: auto; }
.m-drawer__close { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; border: 1px solid var(--line); color: var(--soft); }
.m-drawer__close .icon { width: 18px; height: 18px; }

.m-prof { margin-top: 14px; padding: 14px; border-radius: 18px; border: 1px solid rgb(167 139 250 / .3); background: linear-gradient(160deg, rgb(124 58 237 / .2), rgb(15 23 42 / .6) 60%); }
.m-prof__head { display: flex; align-items: center; gap: 12px; }
.m-prof__avatar { position: relative; flex-shrink: 0; }
.m-prof__face.avatar { width: 48px; height: 48px; font-size: 1rem; box-shadow: 0 0 0 2px #121a36, 0 0 0 4px var(--lg, var(--brand-light)); }
.m-prof__badge { position: absolute; right: -6px; bottom: -6px; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 999px; background: #0b1124; }
.m-prof__who { min-width: 0; }
.m-prof__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; }
.m-prof__league { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--lg, var(--brand-light)); }
.m-prof__bals { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-prof__bal { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgb(7 12 26 / .55); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07); }
.m-prof__bal-label { font-size: 11px; font-weight: 600; color: var(--mute); }
.m-prof__bal strong { font-size: 15px; font-weight: 800; color: var(--ink); }
.m-prof__bal--bonus strong { color: var(--gold-hover); }
.m-prof__topup { margin-top: 10px; height: 44px; border-radius: 12px; }
.m-prof__hello { font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.m-prof__auth { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-prof__login, .m-prof__register { display: inline-flex; height: 44px; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.m-prof__register { border: 1px solid rgb(167 139 250 / .45); background: rgb(124 58 237 / .1); color: var(--lilac); }
.m-prof__login .icon, .m-prof__register .icon { width: 16px; height: 16px; }

.m-drawer__sec { margin-top: 20px; }
.m-drawer__title { margin-bottom: 8px; padding-left: 4px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.m-rows { display: flex; flex-direction: column; gap: 2px; }
.m-row { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 6px 8px 6px 6px; border-radius: 12px; color: var(--ink); transition: background-color .2s; }
.m-row:active { background: rgb(255 255 255 / .05); }
.m-row__ico { display: grid; width: 36px; height: 36px; flex-shrink: 0; place-items: center; border-radius: 10px; background: color-mix(in oklab, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 35%, transparent); color: var(--c); }
.m-row__ico .icon { width: 18px; height: 18px; }
.m-row__label { min-width: 0; flex: 1; font-size: 14.5px; font-weight: 600; }
.m-row__online { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--success); }
.m-row__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgb(74 222 128 / .18); }
.m-row__chev { width: 16px; height: 16px; flex-shrink: 0; color: var(--dim); }
.m-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.m-cat { display: flex; min-height: 48px; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgb(15 23 42 / .6); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 28%, transparent); color: var(--ink); }
.m-cat__ico { display: grid; width: 30px; height: 30px; flex-shrink: 0; place-items: center; border-radius: 9px; background: color-mix(in oklab, var(--c) 18%, transparent); color: var(--c); }
.m-cat__ico .icon { width: 16px; height: 16px; }
.m-cat__name { min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.25; }
.m-drawer__logout { margin-top: 20px; display: flex; height: 46px; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid rgb(248 113 113 / .35); font-size: 14px; font-weight: 700; color: var(--danger); }
.m-drawer__logout .icon { width: 16px; height: 16px; }

/* ── Alt sekme çubuğu (5 × 58 px; ortada 58 px Bonus Kasa dairesi çubuğun 24 px üstüne taşar) ── */
body.has-tabbar { --tabbar-h: calc(74px + env(safe-area-inset-bottom)); }
.mtab {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60; display: block;
  border-top: 1px solid rgb(139 92 246 / .45); background: rgb(11 17 36 / .94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  padding-bottom: env(safe-area-inset-bottom);
}
.mtab__list { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.mtab__link, .mtab__case { position: relative; display: flex; width: 100%; height: 58px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mute); transition: color .2s; }
.mtab__label { font-size: 10.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
.mtab__ico { position: relative; display: grid; place-items: center; }
.mtab__ico .icon { width: 22px; height: 22px; }
.mtab__link[aria-current="page"] { color: #c4b5fd; }
.mtab__link[aria-current="page"]::before {
  content: ""; position: absolute; top: -1px; left: 50%; width: 28px; height: 2px; margin-left: -14px; border-radius: 0 0 2px 2px;
  background: #a78bfa; box-shadow: 0 0 10px 1px rgb(167 139 250 / .9), 0 0 2px rgb(196 181 253 / .9);
}
.mtab__badge {
  position: absolute; top: -7px; right: -11px; display: grid; min-width: 18px; height: 18px; place-items: center; padding-inline: 4px; border-radius: 999px;
  background: var(--brand); box-shadow: 0 0 0 2px #0b1124; font-size: 10px; font-weight: 700; color: #fff;
}
.mtab__case { justify-content: flex-end; padding-bottom: 8px; color: var(--soft); }
.mtab__orb {
  position: absolute; top: -25px; left: 50%; display: grid; width: 58px; height: 58px; margin-left: -29px; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #8b5cf6, #4c1d95); box-shadow: 0 0 0 5px rgba(251, 191, 36, .75), 0 12px 24px -8px rgb(124 58 237 / .95);
}
.mtab__chest { width: 40px; height: auto; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .45)); }
.mtab__keys {
  position: absolute; top: -6px; right: -6px; display: grid; min-width: 20px; height: 20px; place-items: center; padding-inline: 5px; border-radius: 999px;
  background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 0 0 2px #0b1124; font-size: 11px; font-weight: 800; color: #1a1206;
}
.mtab__case:active .mtab__orb { transform: scale(.96); }

/* Bildirim ve çerez kutusu çubuğun üstünde açılır: global.css'te bottom = --tabbar-h + 12 px → 86 px + güvenli alan. */

/* ── Footer: iki sütun, her şey açık ── */
.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding-block: 32px; }
.site-footer__brand { grid-column: 1 / -1; }
.site-footer__logo img { height: 46px; }
.footer-col--footer_3 { grid-column: 1 / -1; }
.footer-col--footer_3 ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.footer-col__title { font-size: 13px; }
.footer-col__title .icon { width: 1.125rem; height: 1.125rem; }
.footer-col ul { margin-top: 10px; }
.footer-col a { max-width: none; padding-block: 6px; font-size: 13px; }
.footer-col a .icon { display: none; }
