/* Telefon görünüşü */
.tabbar { display: none; }
@media (max-width: 900px) {
  .nav, .sideFoot { display: none !important; }
  .side { padding-top: 8px; padding-bottom: 8px; }
  .app { align-content: start; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px;
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: var(--side); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -20px rgba(12, 29, 43, .45);
  }
  .tabbar a, .tabbar button {
    position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; padding: 4px 2px;
    border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent; white-space: nowrap;
  }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar [aria-current] { color: var(--accent); background: var(--accent-soft); }
  .tabbar .badge { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
  .main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
  /* iPhone yazanda səhifəni böyütməsin */
  input, select, textarea { font-size: 16px !important; }
  /* Pəncərələr telefonda bütün ekranı tutsun */
  dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  dialog .dlgHead { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  dialog .dlgBody { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .sheetList { display: grid; gap: 6px; }
  .sheetList a, .sheetList button {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 14px; border: 0; border-radius: 12px;
    background: var(--soft); color: var(--ink); font-size: 15.5px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer;
  }
  .sheetList svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .sheetList .count { margin-left: auto; }
  .sheetList [data-sheet="out"] { color: var(--bad); }
}
/* Kompüterdə: telefon başlığındakı səhifə adı görünməsin; yan paneldəki seçimlər paneldən daşmasın */
.topTitle { display: none; }
.sideFoot { grid-template-columns: minmax(0, 1fr); }
.sideFoot select { width: 100%; min-width: 0; }
.themeBox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.themeBox select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; }
.pushRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pushOn { font-weight: 700; color: var(--ok, #1a7f37); margin-right: auto; }
.pushNote { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

/* ---------- Telefonda tətbiq hissi: keçidlər, şüşə başlıq/menyu, toxunuş effekti, aşağıdan açılan menyu ---------- */
@media (max-width: 900px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { overscroll-behavior-y: none; }
  /* Başlıq: yarımşəffaf şüşə; aşağı sürüşdürəndə səhifənin adı başlığa keçir */
  .side { background: color-mix(in srgb, var(--side) 82%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom-color: transparent; transition: border-color .2s, box-shadow .2s; min-height: 52px; }
  body.isScrolled .side { border-bottom-color: var(--line); box-shadow: 0 8px 20px -18px rgba(12, 29, 43, .55); }
  .logo { transition: opacity .2s, transform .2s; }
  .topTitle { display: block; position: absolute; left: 64px; right: 64px; top: 50%; transform: translateY(-30%); opacity: 0; text-align: center; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition: opacity .2s, transform .2s; }
  body.isScrolled .topTitle { opacity: 1; transform: translateY(-50%); }
  body.isScrolled .logo { opacity: 0; transform: translateY(-6px); }
  /* Qiymətlərdə axtarış zolağı başlığın altında yapışıb qalsın */
  .pTools { top: calc(52px + env(safe-area-inset-top, 0px)) !important; }
  .main > .view > .pageHead h1, #boardRoot .pageHead h1, #pricesRoot .pageHead h1 { font-size: 28px; letter-spacing: -.02em; }

  /* Bölmələr arası keçid: sağa/sola sürüşərək görünür */
  .main > .view:not([hidden]) { animation: uzViewIn .26s cubic-bezier(.2, .8, .2, 1); }
  body[data-dir="fwd"] { --uz-vx: 22px; }
  body[data-dir="back"] { --uz-vx: -22px; }

  /* Kartlar: yumşaq kölgə, daha yumru künclər */
  .panel, .pCard, .bCard, .card { border-radius: 16px; border-color: color-mix(in srgb, var(--line) 55%, transparent); box-shadow: 0 1px 2px rgba(12, 29, 43, .05), 0 10px 24px -20px rgba(12, 29, 43, .35); }

  /* Toxunanda düymə və kart azca içəri basılır */
  .btn, .tabbar a, .tabbar button, .sheetList a, .sheetList button, .pCrBtn, .chip, .pCard, .bCard { transition: transform .14s ease, background-color .2s, color .2s, box-shadow .2s; }
  .btn:active, .tabbar a:active, .tabbar button:active, .sheetList a:active, .sheetList button:active, .pCrBtn:active, .chip:active { transform: scale(.95); }
  .pCard:active, .bCard:active { transform: scale(.985); }

  /* Aşağı menyu zolağı: şüşə fon, aktiv bölmənin arxasında sürüşən işarə */
  .tabbar { background: color-mix(in srgb, var(--side) 84%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); border-top-color: color-mix(in srgb, var(--line) 70%, transparent); user-select: none; -webkit-user-select: none; }
  .tabbar [aria-current] { background: none; }
  .tabbar svg { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), stroke-width .2s; }
  .tabbar [aria-current] svg { transform: translateY(-1px) scale(1.08); stroke-width: 2.2; }
  .tbInd { position: absolute; top: 6px; left: 0; height: 52px; border-radius: 14px; background: var(--accent-soft); transition: transform .32s cubic-bezier(.3, 1.25, .5, 1), width .32s; pointer-events: none; z-index: 0; }
  .tabbar > a, .tabbar > button { z-index: 1; }
  .tabbar [data-tab="satis"] svg { width: 30px; height: 30px; margin: -3px 0 -3px; padding: 4px; border-radius: 50%; background: var(--accent-solid); color: #fff; stroke: #fff; stroke-width: 2.2; box-shadow: 0 6px 14px -6px var(--accent-solid); }
  .tabbar [data-tab="satis"][aria-current] svg { transform: scale(1.06); }

  /* Pəncərələr aşağıdan yuxarı açılır */
  dialog[open] { animation: uzSheetUp .3s cubic-bezier(.2, .8, .2, 1); }
  dialog[open]::backdrop { animation: uzFade .3s ease; }
  /* Menyu: aşağıdan çıxan panel (bütün ekranı tutmur), aşağı çəkəndə bağlanır */
  dialog#menuSheet { top: auto; bottom: 0; height: auto; max-height: 88dvh; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 40px -24px rgba(6, 14, 20, .5); overscroll-behavior: contain; }
  dialog#menuSheet .dlgHead { position: relative; padding-top: 22px; border-bottom: 0; }
  dialog#menuSheet .dlgHead::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; background: var(--line); }
  dialog#menuSheet.isClosing::backdrop { opacity: 0; transition: opacity .22s; }
  .sheetList a, .sheetList button { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
}
@keyframes uzViewIn { from { opacity: 0; transform: translateX(var(--uz-vx, 0)) translateY(6px); } }
@keyframes uzSheetUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes uzFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .main > .view:not([hidden]), dialog[open], dialog[open]::backdrop { animation: none !important; }
  .tbInd, .tabbar svg, .btn, .pCard { transition: none !important; }
}
