/* ==========================================================================
   Craftales — telefon düzeni (en son yüklenir). Masaüstüne dokunmaz.
   ========================================================================== */

/* Alt menü çubuğu: masaüstünde gizli */
.mob-bar { display: none; }

@media (max-width: 760px) {
  /* Sayfa hiçbir koşulda yana taşmasın */
  html, body { overflow-x: hidden; max-width: 100%; }
  main img, .card img { max-width: 100%; height: auto; }
  .grid-side > *, .st-grid > *, .st-top > *, .st-kpis > *, [class*="-grid"] > * { min-width: 0; }

  /* ---------- Üst çubuk: sade ve sığan ---------- */
  .nav { height: 58px; gap: 8px; }
  .brand { gap: 7px; min-width: 0; }
  .brand > img:first-child { width: 32px; height: 32px; }
  .brand-word { height: 18px; }
  .nav-actions { gap: 4px; margin-left: auto; }
  .nav-actions [data-search-open], .nav-actions .cart-btn { display: none; } /* alt çubuğa taşındı */
  .bal-pill { height: 34px; padding: 0 4px 0 9px; gap: 5px; font-size: 13px; }
  .bal-pill .ico { display: none; }
  .bal-pill .bal-plus { width: 26px; height: 26px; font-size: 17px; }
  .acc-btn img { width: 30px; height: 30px; }
  .icon-btn { width: 40px; height: 40px; }

  /* ---------- Genel yerleşim ---------- */
  .container { width: calc(100% - 24px); }
  .section { padding-top: 34px; padding-bottom: 34px; }
  .page-hero { padding-top: 26px; padding-bottom: 14px; }
  .page-hero h1 { font-size: clamp(26px, 8vw, 34px); line-height: 1.15; word-break: break-word; }
  .page-hero p { font-size: 15.5px; }
  .section-head { flex-wrap: wrap; gap: 8px; }
  .section-head h2 { font-size: clamp(22px, 6.5vw, 28px); }
  .card-pad { padding: 16px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .input, .select, .textarea { font-size: 16px; } /* iOS'ta odaklanınca sayfa büyümesin */
  .hero-cta { flex-wrap: wrap; gap: 8px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }

  /* Ana sayfa: dev görsel ekranı kaplamasın */
  .hero-rose { width: min(54vw, 230px); }
  .hero-grid { gap: 10px; }

  /* Tablolar parmakla yana kaydırılsın */
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* Yayıncı paneli */
  .st-top, .st-grid { grid-template-columns: 1fr !important; }
  .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .st-kpi { padding: 12px !important; }
  .st-kpi b { font-size: 21px !important; }
  .st-code-box code { font-size: 16px !important; padding: 8px 10px !important; word-break: break-all !important; }
  .st-code-box .btn { flex: 1 !important; justify-content: center !important; }
  .st-tiers li { grid-template-columns: 18px 70px 1fr !important; font-size: 14px !important; }
  .st-steps li { padding-left: 46px !important; }
  .st-filter { width: 100% !important; }
  .st-filter a { flex: 1 !important; text-align: center !important; padding: 8px 6px !important; font-size: 13px !important; }

  /* Kredi sayfası */
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ---------- Alt menü çubuğu ---------- */
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .mob-bar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(12, 6, 22, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-strong);
  }
  .mob-bar a, .mob-bar button {
    position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 2px;
    background: none; border: 0; color: var(--text-2); font: 600 11px/1.1 var(--font); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-bar .ico { width: 23px; height: 23px; }
  .mob-bar a.is-active { color: #e9a8ff; }
  .mob-bar .mob-play {
    margin-top: -24px; width: 62px; height: 62px; justify-self: center; align-content: center; border-radius: 18px;
    background: linear-gradient(180deg, #e879f9, #a21caf); color: #fff; box-shadow: 0 8px 22px rgba(192, 38, 211, .45), 0 0 0 4px rgba(12, 6, 22, .96);
  }
  .mob-play .ico { width: 26px; height: 26px; }
  .mob-play.copied { background: linear-gradient(180deg, #86efac, #16a34a); }
  .mob-badge {
    position: absolute; top: 0; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #e879f9; color: #1a0b26; font: 800 11px/18px var(--font);
  }
  /* Alt çubuk varken sayfa içi yüzen öğeler onun üstünde dursun */
  .cookie, .toast { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 380px) {
  .brand-word { display: none; } /* çok dar ekranda yalnız simge */
  .bal-pill b { font-size: 12px; }
}

/* Menüdeki "Oyuncu ara" düğmesi (telefonda üst çubuktaki arama buraya taşındı) */
.drawer-search { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 12px; border: 0; background: none; color: inherit; font: 500 18px var(--font); text-align: left; border-radius: var(--r); cursor: pointer; }
.drawer-search:hover { background: var(--surface-3); }
@media (min-width: 761px) { .drawer-search { display: none; } }

/* Enderman sahnesi ve aç/kapa düğmesi alt çubuğun üstünde dursun */
@media (max-width: 760px) {
  .endman { bottom: calc(70px + env(safe-area-inset-bottom)); height: 200px; }
  .endman-toggle { bottom: calc(84px + env(safe-area-inset-bottom)); right: 10px; }
  body.has-endman .footer { padding-bottom: 20px; }
}
