/* =====================================================================
   v0.74 lobi sayfaları (kullanıcı 2026-11-08: "Ayarlar'da olduğu gibi her menünün tasarımını da yap, UI çok düzgün olsun"; "soldan
   açılan her pencerenin akışı harika ve anlaşılır olsun"). Yatay ekranda (≥ 640 px, body.lobby) soldaki düğmeyle açılan tam ekran
   sayfalar: Özelleştir, Görevler, Mağaza, Sıralama, Arkadaş, Düello. Ortak çerçeve: yapışkan başlık ("‹ Geri" + sekmeler), sıkı ama
   nefes alan boşluk (10 px), aynı türdeki kartlar aynı görünüm, yazı ≥ 10 px, dokunma hedefi ≥ 40 px, yalnızca transform / opacity
   ile hafif animasyon (body.calm'da yok). Kuralların hepsi body.lobby.sheet-open kapsamında: dikey / dar ekrandaki eski düzen ve oyun
   değişmez (ui.css'e dokunulmaz). Denetim: tests/browser/layout.js (lobide sekme sayfaları açıkken de).
   ===================================================================== */

/* ---------- oyun temasında metin alanı (arkadaş ekle, takım kur; sohbet penceresindeki zaten bu görünümde) ---------- */
.duel-add input, .team-create input, .chat-form input {
  background: var(--s2); color: #fff; border: var(--bw-sm) solid var(--ink); border-radius: var(--r-md); min-height: 44px; box-sizing: border-box;
  padding: 8px 14px; font: 700 16px var(--font); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.25); outline: none; -webkit-appearance: none; appearance: none;
}
.duel-add input::placeholder, .team-create input::placeholder, .chat-form input::placeholder { color: var(--text-3); opacity: 1; }
.duel-add input:focus, .team-create input:focus, .chat-form input:focus { outline: 3px solid var(--yel-a); outline-offset: 1px; }
/* Görevler alt sekmeleri yalnızca lobi sayfasında (dikeyde bütün bölümler alt alta) */
.q-tabs { display: none; }

/* ---------- sayfa çerçevesi ---------- */
/* sayfanın altında kalan lobi (üst çubuk, gezinme, kahraman sahnesi, modlar) görünmez ve dokunulmaz: yerleşim korunur (kapanınca
   zıplamaz), ekran okuyucu ve klavye odağı yalnızca sayfada */
body.lobby.sheet-open #menu .topbar, body.lobby.sheet-open #menu .lobby-nav, body.lobby.sheet-open #menu .dash > .stage, body.lobby.sheet-open #menu .bg-float { visibility: hidden; }
/* yapışkan başlık */
body.lobby.sheet-open .side { --pg-pad: max(6px, env(safe-area-inset-top)); --pg-head: 50px; row-gap: 10px; padding-top: var(--pg-pad); scroll-padding-top: calc(var(--pg-head) + 12px); overscroll-behavior: contain; }
/* başlık zemini: kaydırılan içerik başlığın altından geçerken görünmesin (ızgaranın 1. satırında, düğmelerin arkasında) */
body.lobby.sheet-open .side::before { content: ''; grid-row: 1; grid-column: 1 / -1; position: sticky; top: 0; z-index: 5; align-self: stretch; pointer-events: none;
  margin: calc(-1 * var(--pg-pad)) calc(-1 * max(12px, env(safe-area-inset-right))) -6px calc(-1 * max(12px, env(safe-area-inset-left)));
  background: linear-gradient(180deg, #2f3fc8 0, #2f3fc8 calc(100% - 8px), rgba(47, 63, 200, 0) 100%); }
body.lobby.sheet-open .sheet-back { grid-row: 1; grid-column: 1; position: sticky; top: 4px; z-index: 6; min-height: 44px; }
body.lobby.sheet-open #main-tabs { grid-row: 1; grid-column: 2; position: sticky; top: 0; z-index: 6; padding: 3px; gap: 3px; }
body.lobby.sheet-open #main-tabs button { flex-direction: row; gap: 6px; min-height: 40px; padding: 2px 8px; }
body.lobby.sheet-open #main-tabs .tab-ic { font-size: 18px; line-height: 1.2; }
body.lobby.sheet-open #main-tabs button > span:not(.tab-ic) { font-size: 13.5px; }
body.lobby.sheet-open #main-tabs button:active { transform: translateY(2px) scale(0.97); }
body.lobby.sheet-open #main-tabs .dot { top: 4px; right: 5px; }
@media (max-width: 1023px) {   /* yatay telefon: simge üstte, ad altta (altı sekme + Mağaza bakiyesi Türkçe adlarla da sığsın) */
  body.lobby.sheet-open #main-tabs button { flex-direction: column; gap: 2px; padding: 1px 3px; }
  body.lobby.sheet-open #main-tabs .tab-ic { font-size: 16px; line-height: 1.2; }
  body.lobby.sheet-open #main-tabs button.sel .tab-ic { transform: none; }   /* büyütülen simge alttaki ada binmesin */
  body.lobby.sheet-open #main-tabs button > span:not(.tab-ic) { font-size: 11.5px; }
}
@media (max-width: 760px) { body.lobby.sheet-open .sheet-back { padding: 4px 12px 4px 10px; font-size: 15px; } }
/* içerik: geniş ekranda okunur genişlik; sayfa içi tek dikey kaydırma */
body.lobby.sheet-open .side > .tab { width: 100%; max-width: 1180px; justify-self: center; padding-bottom: 6px; }
/* aynı türdeki kartlar aynı görünüm: iç kutu, başlık satırı, ara boşluklar ızgarada (kartın kendi alt boşluğu yok) */
body.lobby.sheet-open .side .q-card, body.lobby.sheet-open .side .q-level { margin: 0; padding: 12px 14px; min-width: 0; }
body.lobby.sheet-open .side .q-head { margin-bottom: 8px; gap: 10px; min-height: 28px; }
body.lobby.sheet-open .side .q-head h4 { font-size: 16px; line-height: 1.2; }
body.lobby.sheet-open .side .q-head small { font-size: 12px; text-align: right; }
/* alt sekme çubukları (Kahramanlar / Ülke / Arena, mağaza kategorileri, sıralama süzgeçleri, Görevler grupları): sola yaslı, içerik
   kadar geniş, 40 px */
body.lobby.sheet-open .side .seg-sub { width: fit-content; max-width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 3px; gap: 3px; }
body.lobby.sheet-open .side .seg-sub button { flex: 0 1 auto; min-height: 40px; padding: 4px 16px; font-size: 14px; white-space: nowrap; }
body.lobby.sheet-open .side .seg-sub button:active, body.lobby.sheet-open .side .fr-seg button:active, body.lobby.sheet-open .side .duel-seg button:active { transform: scale(0.96); }
/* sekme geçişi: ui.css'teki kayarak giriş; Mağaza'da yok (bakiye rozeti başlıkta sabit: sekmedeki animasyon onu başlık zemininin
   altında bırakırdı), onun yerine ürün ızgarası hafifçe yükselir */
body.lobby.sheet-open .side > .tab[data-tab="shop"].tab-in-r, body.lobby.sheet-open .side > .tab[data-tab="shop"].tab-in-l { animation: none; }
body.lobby.sheet-open .side > .tab[data-tab="shop"].tab-in-r .shop-grid, body.lobby.sheet-open .side > .tab[data-tab="shop"].tab-in-l .shop-grid { animation: pg-rise 200ms ease-out both; }
@keyframes pg-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body.calm.lobby.sheet-open .side, body.calm.lobby.sheet-open .side > .tab, body.calm.lobby.sheet-open .side [data-qg], body.calm.lobby.sheet-open .side .tro-grid,
body.calm.lobby.sheet-open .side .tro-head, body.calm.lobby.sheet-open .side .shop-grid { animation: none !important; }

/* =====================================================================
   1) Özelleştir — Kahramanlar: solda ızgara (sayfa kayar), sağda seçili kahramanın bilgi kartı yapışkan
   ===================================================================== */
body.lobby.sheet-open .pane[data-pane="character"]:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(236px, 37%, 360px);
  grid-template-rows: auto auto auto auto 1fr; column-gap: 12px; align-items: start; }
body.lobby.sheet-open .pane[data-pane="character"] > * { grid-column: 1; min-width: 0; }
body.lobby.sheet-open .pane[data-pane="character"] > h3 { margin: 12px 0 6px; font-size: 15px; }
body.lobby.sheet-open .pane[data-pane="character"] .heroes { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; padding: 4px 4px 6px; }
body.lobby.sheet-open .hero-info { grid-column: 2 !important; grid-row: 1 / -1; position: sticky; top: calc(var(--pg-head) + 4px); margin: 4px 0 0; padding: 10px 12px;
  max-height: calc(100vh - var(--pg-head) - 22px); max-height: calc(100dvh - var(--pg-head) - 22px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box;
  box-shadow: inset 4px 0 0 var(--hc, var(--yel-a)), 0 4px 0 var(--ink); scrollbar-width: thin; }
body.lobby.sheet-open .hero-info .hi-head { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
body.lobby.sheet-open .hero-info .hi-head b { font-size: 19px; line-height: 1.15; }
body.lobby.sheet-open .hero-info .hi-head span { font-size: 13px; }
body.lobby.sheet-open .hero-info .hi-super { margin-top: 6px; padding: 7px 8px; gap: 8px; }
body.lobby.sheet-open .hero-info .hi-super i { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
body.lobby.sheet-open .hero-info .hi-super b { font-size: 14px; line-height: 1.2; }
body.lobby.sheet-open .hero-info .hi-super p { font-size: 12px; line-height: 1.3; }
body.lobby.sheet-open .hero-info .hi-mst { margin-top: 6px; }
body.lobby.sheet-open .hero-info .hi-up .up-row { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; }
body.lobby.sheet-open .hero-info .hi-up .up-buy { min-height: 40px; min-width: 64px; padding: 0 10px; }
body.lobby.sheet-open .hero-info .hi-soon { font-size: 11.5px; margin-top: 6px; }
body.lobby.sheet-open .hero-info .btn-soft, body.lobby.sheet-open .hero-info .btn-primary { min-height: 40px; }
/* Ülke / Arena: düzenli ızgara, sıkı aralık */
body.lobby.sheet-open .pane[data-pane="country"] .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-top: 0; }
body.lobby.sheet-open .pane[data-pane="arena"] .grid { gap: 8px; margin-top: 0; }
body.lobby.sheet-open .pane[data-pane="arena"] .grid + .grid, body.lobby.sheet-open .pane[data-pane="arena"] h3 + .grid { margin-top: 8px; }
body.lobby.sheet-open .pane[data-pane="arena"] .grid.thumbs { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
body.lobby.sheet-open .pane[data-pane="arena"] > h3 { margin: 14px 0 6px; font-size: 15px; }
body.lobby.sheet-open .pane[data-pane="arena"] .grid.levelup:not(:empty) { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
@media (max-width: 700px) {
  body.lobby.sheet-open .pane[data-pane="character"]:not([hidden]) { grid-template-columns: minmax(0, 1fr) 236px; column-gap: 10px; }
  body.lobby.sheet-open .pane[data-pane="character"] .heroes { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* =====================================================================
   2) Görevler — üstte alt sekmeler (Günlük / Yollar / Kupalar) + seviye şeridi; Günlük: seri + kutu solda, görevler sağda;
   Yollar: Kupa Yolu ve Sezon tam genişlik, renkle ayrık; Kupalar: vitrin tam genişlik
   ===================================================================== */
body.lobby.sheet-open #quests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; gap: 10px; align-items: start; }
body.lobby.sheet-open #quests > * { min-width: 0; }
body.lobby.sheet-open #quests > .q-locked { grid-column: 1 / -1; }
body.lobby.sheet-open #quests .q-tabs { display: flex; grid-row: 1; grid-column: 1; align-self: center; margin: 0; }
body.lobby.sheet-open #quests .q-tabs button { display: inline-flex; align-items: center; gap: 6px; }
body.lobby.sheet-open .q-tab-n { min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: var(--danger); color: #fff; border: 2px solid var(--ink);
  font: 900 11px/16px var(--font); font-style: normal; text-align: center; }
/* seviye: tek satırlık ince şerit (sekmelerin yanında) */
body.lobby.sheet-open #quests .q-level { grid-row: 1; grid-column: 2; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; }
body.lobby.sheet-open #quests .q-lvl-num { width: 40px; height: 40px; }
body.lobby.sheet-open #quests .q-lvl-num b { font-size: 16px; }
body.lobby.sheet-open #quests .q-lvl-txt { gap: 2px; min-width: 0; }
body.lobby.sheet-open #quests .q-lvl-txt > b { font-size: 14px; line-height: 1.1; }
body.lobby.sheet-open #quests .q-lvl-txt small { font-size: 11px; line-height: 1.25; }
body.lobby.sheet-open #quests .q-lvl-txt .bar { height: 7px; }
/* gruplar: seçili olmayan gizli; görünen grup hafifçe yükselerek gelir */
body.lobby.sheet-open #quests[data-qg="daily"] [data-qg]:not([data-qg="daily"]),
body.lobby.sheet-open #quests[data-qg="roads"] [data-qg]:not([data-qg="roads"]),
body.lobby.sheet-open #quests[data-qg="trophies"] [data-qg],
body.lobby.sheet-open #quests:not([data-qg="trophies"]) > .tro-head,
body.lobby.sheet-open #quests:not([data-qg="trophies"]) > .tro-grid { display: none; }
body.lobby.sheet-open #quests [data-qg], body.lobby.sheet-open #quests > .tro-head, body.lobby.sheet-open #quests > .tro-grid { animation: pg-rise 180ms ease-out both; }
/* Günlük: seri (sol üst), kutu (sol alt), görevler (sağ, iki satır boyunca) */
body.lobby.sheet-open #quests .q-streak { grid-column: 1; order: 1; }
body.lobby.sheet-open #quests .q-missions { grid-column: 2; grid-row: span 2; order: 2; }
body.lobby.sheet-open #quests .q-card.drops { grid-column: 1; order: 3; }
body.lobby.sheet-open #quests .q-streak .cal { gap: 5px; margin-bottom: 8px; }
body.lobby.sheet-open #quests .q-streak .cal-day { padding: 6px 1px; min-width: 0; }
body.lobby.sheet-open #quests .q-streak .btn-daily { min-height: 44px; }
body.lobby.sheet-open #quests .q-next { font-size: 12px; }
/* görev satırı: zorluk rozeti sabit genişlikte (çubuklar aynı yerden başlar); alınmış görevin çubuğu soluk */
body.lobby.sheet-open #quests .missions { gap: 6px; }
body.lobby.sheet-open #quests .mission { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px; }
body.lobby.sheet-open #quests .mission .tier { justify-self: stretch; text-align: center; padding: 3px 2px; font-size: 10px; }
body.lobby.sheet-open #quests .mission .m-body { display: grid; gap: 3px; min-width: 0; }
body.lobby.sheet-open #quests .mission .m-body b { font-size: 13.5px; line-height: 1.2; }
body.lobby.sheet-open #quests .mission .btn-card { min-height: 40px; }
body.lobby.sheet-open #quests .mission.claimed .bar { opacity: 0.4; }
body.lobby.sheet-open #quests .mission .m-done { font-size: 13px; white-space: nowrap; }
body.lobby.sheet-open #quests .chest { margin-top: 8px; padding: 8px 12px; }
body.lobby.sheet-open #quests .drops .drop-box { min-height: 40px; }
body.lobby.sheet-open #quests .drops .drop-odds { min-height: 40px; padding: 2px 12px; font-size: 12px; }
/* Yollar: iki şerit tam genişlik; Kupa Yolu altın, Sezon mor başlık ve çerçeve (kademeler birbirine karışmasın) */
body.lobby.sheet-open #quests .q-card.road, body.lobby.sheet-open #quests .q-card.season { grid-column: 1 / -1; }
body.lobby.sheet-open #quests .q-card.road { box-shadow: inset 0 4px 0 var(--yel-b), inset 0 2px 0 rgba(255, 255, 255, 0.06); }
body.lobby.sheet-open #quests .q-card.road .q-head h4 { color: var(--yel-a); }
body.lobby.sheet-open #quests .q-card.season { box-shadow: inset 0 4px 0 #7b5cff, inset 0 2px 0 rgba(255, 255, 255, 0.06); }
body.lobby.sheet-open #quests .q-card.season .q-head h4 { color: #c9bdff; }
body.lobby.sheet-open #quests .q-card.season .stier.locked { background: #4a5196; }
body.lobby.sheet-open #quests .q-card.season .stier.item:not(.ready):not(.claimed) { background: linear-gradient(180deg, #7b5cff, #5a3fd6); }
body.lobby.sheet-open #quests .season-how { margin: 0 0 4px; font-size: 12px; }
body.lobby.sheet-open #quests .season-bar { margin-bottom: 4px; }
body.lobby.sheet-open #quests .track { padding: 6px 4px 12px; }
body.lobby.sheet-open #quests .q-card.road .btn-daily, body.lobby.sheet-open #quests .q-card.season .btn-daily { width: auto; min-width: 220px; min-height: 44px; display: block; margin: 2px auto 0; padding: 0 24px; }
/* Kupalar: başlık ve vitrin tam genişlik (kart içi yazı sığdırma ui.css'te) */
body.lobby.sheet-open #quests > .tro-head, body.lobby.sheet-open #quests > .tro-grid { grid-column: 1 / -1; margin: 0; }
body.lobby.sheet-open #quests > .tro-head { grid-row: 2; align-self: end; }
body.lobby.sheet-open #quests > .tro-grid { grid-row: 3; }
@media (max-width: 700px) {   /* dar yatay telefon: tek sütun (seri takvimi 7 gün sığsın) */
  body.lobby.sheet-open #quests { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body.lobby.sheet-open #quests > * { grid-column: 1 !important; grid-row: auto !important; }
  body.lobby.sheet-open #quests .q-level { order: -2; }
  body.lobby.sheet-open #quests .q-tabs { order: -1; }
}

/* =====================================================================
   3) Mağaza — bakiye başlıkta küçük rozet; ücretsiz hediye | günün fırsatı | sana özel fırsatlar tek vitrin şeridinde; kategoriler;
   ürün ızgarası
   ===================================================================== */
body.lobby.sheet-open #shop-head { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 0 0 10px; }
body.lobby.sheet-open #shop-head > * { margin: 0; min-width: 0; box-sizing: border-box; }
body.lobby.sheet-open #shop-head .bal { order: 0; flex: 0 0 auto; flex-direction: row; align-items: baseline; gap: 8px; padding: 6px 14px; border-radius: 999px; }
body.lobby.sheet-open #shop-head .bal span { font-size: 11px; }
body.lobby.sheet-open #shop-head .bal b { font-size: 20px; line-height: 1.1; }
body.lobby.sheet-open #shop-head .bal small { font-size: 11px; }
/* geniş yatay ekranda bakiye sayfa başlığında (sekmelerin sağında, kaydırınca da görünür) */
@media (min-width: 761px) {
  body.lobby.sheet-open #menu[data-tab="shop"] #main-tabs { margin-right: 152px; }
  body.lobby.sheet-open #menu[data-tab="shop"] #shop-head .bal { position: fixed; z-index: 7; top: calc(var(--pg-pad) + 3px); right: max(12px, env(safe-area-inset-right)); width: 142px; height: 44px; overflow: hidden;
    padding: 0 10px; justify-content: center; align-items: center; gap: 4px; flex-direction: row; box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.08); }
  body.lobby.sheet-open #menu[data-tab="shop"] #shop-head .bal span { display: none; }
  body.lobby.sheet-open #menu[data-tab="shop"] #shop-head .bal b { font-size: 17px; white-space: nowrap; letter-spacing: -0.2px; }
  body.lobby.sheet-open #menu[data-tab="shop"] #shop-head .bal b small { display: none; }   /* para simgesi birimi söyler */
}
/* vitrin: üç eşit kutu (özel fırsatlar iki ürün → iki kat) */
body.lobby.sheet-open #shop-head .free-slot { order: 1; flex: 1 1 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 6px 8px; padding: 8px 10px; }
body.lobby.sheet-open #shop-head .free-slot .free-ic { font-size: 24px; align-self: center; }
body.lobby.sheet-open #shop-head .free-slot .free-txt { align-self: center; min-width: 0; }
body.lobby.sheet-open #shop-head .free-slot .free-txt b { display: block; font-size: 14px; line-height: 1.15; }
body.lobby.sheet-open #shop-head .free-slot .free-txt small { display: block; font-size: 11.5px; line-height: 1.2; }
body.lobby.sheet-open #shop-head .free-slot .free-btn, body.lobby.sheet-open #shop-head .free-slot .free-done { grid-column: 1 / -1; min-height: 40px; width: 100%; white-space: nowrap; }
body.lobby.sheet-open #shop-head .free-slot .free-done { display: grid; place-items: center; font-style: normal; font-weight: 900; }
body.lobby.sheet-open #shop-head .deal { order: 2; flex: 1 1 0; margin: 0; padding: 8px 10px; align-items: center; }
body.lobby.sheet-open #shop-head .deal .deal-pv { width: 56px; }
body.lobby.sheet-open #shop-head .deal .off { top: -8px; right: -4px; }
body.lobby.sheet-open #shop-head .offers { order: 3; flex: 2 1 0; display: flex; flex-direction: column; padding: 6px 10px 8px; border: var(--bw-sm) solid var(--ink); border-radius: var(--r-md);
  background: var(--s2); }
body.lobby.sheet-open #shop-head .offers-head { margin-bottom: 4px; gap: 8px; }
body.lobby.sheet-open #shop-head .offers-head b { font-size: 14px; }
body.lobby.sheet-open #shop-head .offers-head small { font-size: 11px; white-space: nowrap; }
body.lobby.sheet-open #shop-head .offer-row { flex: 1 1 auto; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
body.lobby.sheet-open #shop-head .offer { min-height: 56px; }
body.lobby.sheet-open #shop-head .earn { order: 4; flex: 1 1 100%; font-size: 12px; line-height: 1.35; }
body.lobby.sheet-open #shop-head > .btn-primary { order: 5; flex: 1 1 100%; min-height: 44px; }
body.lobby.sheet-open .tab[data-tab="shop"] .shop-grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; margin-top: 0; }
body.lobby.sheet-open .tab[data-tab="shop"] .shop-card .btn-card { min-height: 40px; }
body.lobby.sheet-open .tab[data-tab="shop"] .shop-note { margin: 10px 0 0; font-size: 12px; text-align: center; }
@media (max-width: 760px) {   /* dar: bakiye ince şerit, hediye + fırsat yan yana, özel fırsatlar alt satırda tam genişlik */
  body.lobby.sheet-open #shop-head .bal { flex: 1 1 100%; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: var(--r-md); }
  body.lobby.sheet-open #shop-head .free-slot, body.lobby.sheet-open #shop-head .deal { flex: 1 1 calc(50% - 5px); }
  body.lobby.sheet-open #shop-head .offers { flex: 1 1 100%; }
}

/* =====================================================================
   4) Sıralama — mod sekmeleri ve Herkes / Arkadaşlar aynı satırda, dönem altta; sıkı satırlar (≈ 44 px), ilk üçe madalya, altta
   yapışkan "senin sıran"
   ===================================================================== */
/* sıralama araç çubuğu (kullanıcı 2026-11-08: "pencerelerin içi düzensiz"): mod seçimi üstte tam genişlik (eşit düğmeler), altında
   soldan sağa kapsam (Herkes / Arkadaşlar) + dönem (Bugün / Bu hafta / Herkes) — hepsi aynı boy, aynı sol kenar */
body.lobby.sheet-open .tab[data-tab="leaderboard"]:not([hidden]) { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0 8px; align-content: start; }
body.lobby.sheet-open .tab[data-tab="leaderboard"] > * { grid-column: 1 / -1; min-width: 0; }
body.lobby.sheet-open #lb-modes { grid-row: 1; width: 100%; max-width: none; margin-bottom: 8px; }
body.lobby.sheet-open #lb-modes button { flex: 1 1 0; }
body.lobby.sheet-open #lb-scope { grid-column: 1; grid-row: 2; justify-self: start; margin-bottom: 10px; }
body.lobby.sheet-open #lb-tabs { grid-column: 2; grid-row: 2; justify-self: start; margin-bottom: 10px; }
body.lobby.sheet-open #lb-scope button, body.lobby.sheet-open #lb-modes button, body.lobby.sheet-open #lb-tabs button { min-height: 40px; padding: 4px 12px; font-size: 14px; }
body.lobby.sheet-open #lb-list { gap: 4px; }
body.lobby.sheet-open #lb-list li { grid-template-columns: 36px minmax(0, 1fr) auto auto 36px; gap: 10px; min-height: 44px; box-sizing: border-box; padding: 3px 6px 3px 8px; }
body.lobby.sheet-open #lb-list li.empty { display: block; min-height: 0; padding: 24px 10px; }
body.lobby.sheet-open #lb-list .r { position: relative; font-size: 15px; }
body.lobby.sheet-open #lb-list .n { font-size: 15px; }
body.lobby.sheet-open #lb-list .l { font-size: 12px; }
body.lobby.sheet-open #lb-list .s { font-size: 16px; text-align: right; white-space: nowrap; }
body.lobby.sheet-open #lb-list .l { white-space: nowrap; }
body.lobby.sheet-open #lb-list .more { width: 36px; height: 36px; }
/* madalya: sıra numarası erişilebilir metin olarak kalır, üstüne madalya çizilir */
body.lobby.sheet-open #lb-list li.top1 .r, body.lobby.sheet-open #lb-list li.top2 .r, body.lobby.sheet-open #lb-list li.top3 .r { color: transparent; }
body.lobby.sheet-open #lb-list li.top1 .r::after, body.lobby.sheet-open #lb-list li.top2 .r::after, body.lobby.sheet-open #lb-list li.top3 .r::after {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; color: #fff; }
body.lobby.sheet-open #lb-list li.top1 .r::after { content: '🥇'; }
body.lobby.sheet-open #lb-list li.top2 .r::after { content: '🥈'; }
body.lobby.sheet-open #lb-list li.top3 .r::after { content: '🥉'; }
body.lobby.sheet-open #lb-list li.top1 { box-shadow: inset 4px 0 0 #ffd23a; }
body.lobby.sheet-open #lb-list li.top2 { box-shadow: inset 4px 0 0 #e3e9ff; }
body.lobby.sheet-open #lb-list li.top3 { box-shadow: inset 4px 0 0 #ffad6b; }
body.lobby.sheet-open #lb-list li.me { box-shadow: 0 0 0 2px var(--yel-a) inset; }
body.lobby.sheet-open .lb-push { order: 4; margin: 8px 0 0; font-size: 12.5px; }
body.lobby.sheet-open .lb-me { order: 5; position: sticky; bottom: 0; z-index: 3; margin: 8px 0 0; padding: 10px 14px; border-radius: var(--r-md); border: var(--bw-sm) solid var(--ink);
  background: #23408e; color: #fff; font: 900 14px var(--font); text-align: center; box-shadow: 0 -6px 14px rgba(10, 12, 46, 0.35), inset 0 0 0 2px var(--yel-a); }
@media (max-width: 760px) {
  body.lobby.sheet-open #lb-modes button, body.lobby.sheet-open #lb-scope button { padding: 4px 9px; font-size: 13px; }
  body.lobby.sheet-open #lb-list li { gap: 8px; }
}

/* =====================================================================
   5) Arkadaş — gelen istekler en üstte tam genişlik; solda "Arkadaş ekle" + takım kartı, sağda arkadaş sıralaması
   ===================================================================== */
body.lobby.sheet-open #friends { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); grid-template-rows: auto auto auto 1fr; gap: 10px; align-items: start; }
body.lobby.sheet-open #friends > * { grid-column: 2; min-width: 0; }
body.lobby.sheet-open #friends > .q-locked, body.lobby.sheet-open #friends > .fr-reqs { grid-column: 1 / -1; grid-row: 1; }
body.lobby.sheet-open #friends > .fr-add { grid-column: 1; grid-row: 2; }
body.lobby.sheet-open #friends > .team-card { grid-column: 1; grid-row: 3 / span 2; }
body.lobby.sheet-open #friends > .fr-board, body.lobby.sheet-open #friends > .q-card:not(.fr-add):not(.fr-reqs):not(.team-card), body.lobby.sheet-open #friends > p { grid-column: 2; grid-row: 2 / span 3; }
body.lobby.sheet-open #friends .fr-reqs { padding: 6px 12px; }
body.lobby.sheet-open #friends .fr-req { min-height: 44px; }
body.lobby.sheet-open #friends .fr-add .q-head { flex-wrap: wrap; }
body.lobby.sheet-open #friends .fr-add .q-head small { display: inline-flex; align-items: center; gap: 4px; }
body.lobby.sheet-open #friends .fr-share { width: 40px; min-width: 40px; height: 40px; }
body.lobby.sheet-open #friends .duel-add { margin-top: 0; }
body.lobby.sheet-open #friends .fr-add > p { margin: 8px 0 0; }
body.lobby.sheet-open #friends .duel-add .btn-primary { min-height: 44px; }
body.lobby.sheet-open #friends .team-card .team-h { font-size: 16px; }
body.lobby.sheet-open #friends .team-card .team-tier, body.lobby.sheet-open #friends .team-card .team-invite button, body.lobby.sheet-open #friends .team-card .team-create .btn-primary { min-height: 40px; }
body.lobby.sheet-open #friends .team-create { display: flex; gap: 8px; }
body.lobby.sheet-open #friends .team-create input { flex: 1 1 auto; min-width: 0; width: auto; }
body.lobby.sheet-open #friends .team-create .btn-primary { flex: 0 0 auto; width: auto; padding: 0 14px; }
/* sıralama satırı: sohbet ve düello belirgin, "sil" ikincil (saydam, ayrık) — yanlışlıkla basılmasın */
body.lobby.sheet-open #friends .fr-list li { min-height: 52px; box-sizing: border-box; gap: 8px; }
body.lobby.sheet-open #friends .fr-who b { font-size: 15px; }
body.lobby.sheet-open #friends .fr-st { font-size: 12px; }
body.lobby.sheet-open #friends .fr-val { font-size: 15px; }
body.lobby.sheet-open #friends .fr-acts { gap: 6px; align-items: center; }
body.lobby.sheet-open #friends .fr-list li .fr-chat, body.lobby.sheet-open #friends .fr-list li .fr-inv { width: 40px; min-width: 40px; height: 40px; font-size: 18px; }
body.lobby.sheet-open #friends .fr-list li .fr-inv { font-size: 21px; }
body.lobby.sheet-open #friends .fr-list li .fr-rm:not(.confirm) { width: 40px; min-width: 40px; height: 40px; margin-left: 4px; background: transparent; border-color: transparent; box-shadow: none;
  color: var(--text-3); font-size: 14px; }
body.lobby.sheet-open #friends .fr-list li .fr-rm.confirm { height: 40px; margin-left: 4px; }
body.lobby.sheet-open #friends .fr-seg button { min-height: 40px; }
@media (max-width: 700px) {
  body.lobby.sheet-open #friends { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body.lobby.sheet-open #friends > * { grid-column: 1 !important; grid-row: auto !important; }
  body.lobby.sheet-open #friends > .fr-reqs { order: -3; } body.lobby.sheet-open #friends > .fr-add { order: -2; } body.lobby.sheet-open #friends > .team-card { order: 1; }
}

/* =====================================================================
   6) Düello — gelen davet / lobi en üstte; iki mod yan yana kutu (ayrı renk şeridi, kural, ayrı düğme); arkadaşlar | sıralama;
   son maçlar tam genişlik
   ===================================================================== */
body.lobby.sheet-open #duel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
body.lobby.sheet-open #duel > * { min-width: 0; grid-column: 1 / -1; }
body.lobby.sheet-open #duel > .duel-invite { order: -3; }
body.lobby.sheet-open #duel > .duel-lobby { order: -2; }
body.lobby.sheet-open #duel > .duel-arena { grid-column: 1; order: -1; }
body.lobby.sheet-open #duel > .duel-quick { grid-column: 2; order: -1; }
body.lobby.sheet-open #duel > .duel-friends { grid-column: 1; order: 0; align-self: start; }
body.lobby.sheet-open #duel > .duel-board { grid-column: 2; order: 0; align-self: start; }
body.lobby.sheet-open #duel > .duel-history { order: 1; }
/* mod kutuları: başlık, tek satırlık kural, düğmeler altta hizalı */
body.lobby.sheet-open #duel > .duel-arena, body.lobby.sheet-open #duel > .duel-quick { display: flex; flex-direction: column; }
body.lobby.sheet-open #duel > .duel-arena { box-shadow: inset 0 4px 0 #4f8bff, inset 0 2px 0 rgba(255, 255, 255, 0.06); }
body.lobby.sheet-open #duel > .duel-quick { box-shadow: inset 0 4px 0 #ff7a1a, inset 0 2px 0 rgba(255, 255, 255, 0.06); }
body.lobby.sheet-open #duel > .duel-arena .q-head, body.lobby.sheet-open #duel > .duel-quick .q-head { flex-direction: column; align-items: flex-start; gap: 3px; }
body.lobby.sheet-open #duel > .duel-arena .q-head small, body.lobby.sheet-open #duel > .duel-quick .q-head small { text-align: left; line-height: 1.3; }
body.lobby.sheet-open #duel > .duel-arena > .btn-row, body.lobby.sheet-open #duel > .duel-quick > .btn-primary,
body.lobby.sheet-open #duel > .duel-arena > .duel-row, body.lobby.sheet-open #duel > .duel-quick > .duel-row { margin-top: auto; }
body.lobby.sheet-open #duel .btn-primary, body.lobby.sheet-open #duel .btn-soft { min-height: 44px; }
body.lobby.sheet-open #duel .duel-invite { padding: 8px 12px; }
body.lobby.sheet-open #duel .duel-invite p { margin: 0 0 6px; font-weight: 800; }
body.lobby.sheet-open #duel .duel-invite .btn-row { margin-top: 0; }
body.lobby.sheet-open #duel .duel-friends .q-head .duel-go { height: 40px; min-height: 40px; padding: 0 12px; }
body.lobby.sheet-open #duel .duel-friends > .btn-primary { margin-top: 8px; width: 100%; }
body.lobby.sheet-open #duel .duel-list li { min-height: 44px; box-sizing: border-box; }
body.lobby.sheet-open #duel .duel-seg { margin-top: 2px; }
body.lobby.sheet-open #duel .duel-seg button { min-height: 40px; }
body.lobby.sheet-open #duel .duel-board .duel-rank { flex: 0 0 26px; text-align: center; font-weight: 900; color: var(--yel-a); }
body.lobby.sheet-open #duel .duel-board .duel-list li > b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.lobby.sheet-open #duel .duel-board .duel-list li.me { box-shadow: inset 0 0 0 2px var(--yel-a); }
body.lobby.sheet-open #duel .duel-prize p { margin: 8px 0 2px; font-size: 13px; }
body.lobby.sheet-open #duel .duel-note { margin: 8px 0 0; font-size: 12px; }
body.lobby.sheet-open #duel .duel-hist { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
body.lobby.sheet-open #duel .duel-hist li { flex-direction: column; align-items: stretch; gap: 4px; }
@media (max-width: 700px) {
  body.lobby.sheet-open #duel { grid-template-columns: minmax(0, 1fr); }
  body.lobby.sheet-open #duel > * { grid-column: 1 !important; }
}
/* giriş serisi: alınmış günün tiki paranın yerinde (ortada) — sağ üstte "1. gün" yazısının üstüne biniyordu ("1. gü✓") */
body.lobby.sheet-open #quests .q-streak .cal-day.done .moon-ic { visibility: hidden; }
body.lobby.sheet-open #quests .q-streak .cal-day .tick { top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%); }
/* Görevler üst satırı: alt sekmeler seviye kartının ortasına hizalı (biri üstte biri ortada duruyordu) */
body.lobby.sheet-open #quests > .q-top, body.lobby.sheet-open #quests .q-headrow { align-items: center; }
/* kısa yatay ekranda mağaza kartı tek bakışta görünsün: önizleme alçak, boşluklar az (kart ekranın altına taşıyordu) */
@media (max-height: 520px) and (orientation: landscape) {
  body.lobby.sheet-open .tab[data-tab="shop"] .shop-card { gap: 4px; padding: 8px; }
  body.lobby.sheet-open .tab[data-tab="shop"] .shop-card .pv { height: 70px; margin-bottom: 2px; }
  body.lobby.sheet-open .tab[data-tab="shop"] .shop-card .pv canvas { max-height: 70px; width: auto; }
  body.lobby.sheet-open .tab[data-tab="shop"] .shop-card .fx { margin: 0 2px 4px; font-size: 11.5px; }
}
/* seviye şeridi tek satır yazı: açıklama ("Her oyun ve görev XP kazandırır …") lobide gizli — bilgi (i) penceresinde var; şerit sekmelerle aynı boyda */
body.lobby.sheet-open #quests .q-level .q-xp-hint { display: none; }
body.lobby.sheet-open #lb-scope[hidden] + #lb-tabs { grid-column: 1; }   /* misafir: kapsam yok → dönem sol kenarda */
