/* ---------- نوار ناوبری پایینِ گوشی: خانه · امروز در تاریخ · فال حافظ · بیشتر ----------
   «بیشتر» همان پنلِ دسترسی سریع را باز می‌کند (جست‌وجو، فونت، حالت شب، تماس…). دسکتاپ بدون این نوار است. */
.ttk-nav{ display:none; }
@media (max-width:1023.98px){
  body:has(#ttkNav){ padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)) !important; }
  .ttk-nav{
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:stretch; gap:4px;
    position:fixed; left:10px; right:10px; bottom:calc(10px + env(safe-area-inset-bottom,0px));
    height:64px; padding:6px; box-sizing:border-box; z-index:800;
    background:#fff; border:1px solid #E3E1DA; border-radius:24px;
    box-shadow:0 10px 26px -8px rgba(23,34,51,.45);
  }
  .app.dark .ttk-nav{ background:#1A222B; border-color:#2A323C; box-shadow:0 10px 26px -8px rgba(0,0,0,.6); }
  .ttk-nav-item{
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
    min-width:0; margin:0; padding:4px 2px; border:0; border-radius:18px; background:transparent;
    color:#6B7480; font-family:inherit; font-size:10.5px; font-weight:700; line-height:1.25; text-align:center;
    text-decoration:none; cursor:pointer; -webkit-tap-highlight-color:transparent;
  }
  .ttk-nav-item svg{ width:22px; height:22px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
  .ttk-nav-item span{ display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ttk-nav-item[aria-current="page"], .ttk-nav-item[aria-expanded="true"]{ color:#16202E; background:#FFF4D6; }
  .app.dark .ttk-nav-item{ color:#AEB5C0; }
  .app.dark .ttk-nav-item[aria-current="page"], .app.dark .ttk-nav-item[aria-expanded="true"]{ color:#F3D98B; background:#2A3442; }
  .ttk-nav-item:focus-visible{ outline:2px solid #E0A72A; outline-offset:2px; }

  /* دکمه‌ی + شناور در گوشی نیست؛ پنلش از کنار «بیشتر» بالای نوار باز می‌شود */
  .qam-toggle{ display:none !important; }
  body:has(#ttkNav) .app .qam{ left:12px !important; right:auto !important; bottom:calc(10px + 64px + 10px + env(safe-area-inset-bottom,0px)) !important; width:auto !important; height:auto !important; }
  body:has(#ttkNav) .app .qam-panel{ left:0 !important; right:auto !important; bottom:0 !important; }
  body:has(#ttkNav) .app .qam-panel .qam-item{ font-size:13px !important; padding:9px 10px !important; }
}

/* ---------- برگه‌ی «بیشتر» در گوشی: لوگو + جست‌وجو + بستن، نوار جست‌وجو، کاشی‌های دسترسی سریع ---------- */
@media (max-width:1023.98px){
  .ttk-nav{ z-index:400; }                         /* زیرِ پوششِ برگه (z-index:500) */
  .ttk-more-sheet{ background:#FBFAF7; color:#16202E; padding:8px 16px calc(18px + env(safe-area-inset-bottom,0px)); }
  .app.dark .ttk-more-sheet{ background:#1A222B; color:#E9EDF2; }
  .ttk-more-head{ display:flex; align-items:center; gap:10px; }
  .ttk-more-brand{ flex:1; display:flex; align-items:center; gap:8px; min-width:0; }
  .ttk-more-brand b{ font-size:18px; font-weight:900; }
  .ttk-more-brand b span{ color:#B97F12; }
  .app.dark .ttk-more-brand b span{ color:#F3D98B; }
  .ttk-more-mark{ width:34px; height:34px; border-radius:11px; display:flex; align-items:center; justify-content:center;
    background:linear-gradient(160deg,#F2C14E,#D98E12); box-shadow:0 3px 0 #9A6A10, inset 0 1px 0 rgba(255,255,255,.5);
    color:#16202E; font-size:17px; font-weight:900; }
  .ttk-more-ib{ width:40px; height:40px; flex-shrink:0; border:0; border-radius:14px; display:flex; align-items:center; justify-content:center;
    background:#fff; color:#16202E; box-shadow:0 3px 0 #E3E1DA; cursor:pointer; padding:0; }
  .app.dark .ttk-more-ib{ background:#263140; color:#E9EDF2; box-shadow:0 3px 0 #0B1119; }
  .ttk-more-ib--x{ background:#16202E; color:#fff; box-shadow:0 3px 0 #05090F; }
  .app.dark .ttk-more-ib--x{ background:#E9EDF2; color:#16202E; box-shadow:0 3px 0 #9AA4B2; }
  .ttk-more-ib svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round; }
  .ttk-more-bar{ width:100%; height:48px; margin:14px 0; border:1px solid #E3E1DA; border-radius:16px; background:#fff; box-shadow:0 3px 0 #E3E1DA;
    display:flex; align-items:center; gap:10px; padding:0 14px; color:#6B7480; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; }
  .app.dark .ttk-more-bar{ background:#263140; border-color:#2F3A48; box-shadow:0 3px 0 #0B1119; color:#AEB5C0; }
  .ttk-more-bar svg{ width:18px; height:18px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2.1; stroke-linecap:round; }
  .ttk-more-label{ font-size:11px; font-weight:800; color:#6B7480; margin:0 2px 8px; }
  .ttk-more-body .qam-panel{ position:static !important; display:grid !important; grid-template-columns:1fr 1fr !important; gap:10px !important;
    width:auto !important; max-height:none !important; overflow:visible !important; opacity:1 !important; visibility:visible !important;
    transform:none !important; pointer-events:auto !important; background:none !important; box-shadow:none !important; border:0 !important;
    padding:0 !important; border-radius:0 !important; left:auto !important; right:auto !important; bottom:auto !important; }
  .ttk-more-body .qam-item{ display:flex !important; align-items:center; gap:10px !important; min-height:60px; width:auto !important;
    margin:0 !important; padding:12px !important; border:0 !important; border-radius:18px !important; background:#fff !important;
    box-shadow:0 3px 0 #E3E1DA !important; color:#16202E !important; font-size:12.5px !important; font-weight:800 !important; transform:none !important; }
  .app.dark .ttk-more-body .qam-item{ background:#263140 !important; color:#E9EDF2 !important; box-shadow:0 3px 0 #0B1119 !important; }
  .ttk-more-body .qam-item .qam-ico{ width:36px !important; height:36px !important; border-radius:12px !important; flex-shrink:0; }
  .ttk-more-body .qam-item .qam-ico svg{ width:18px !important; height:18px !important; }
  .ttk-more-body .qam-font-wrap, .ttk-more-body .qam-tools-wrap{ grid-column:1 / -1; }
  .ttk-more-body .qam-item[hidden]{ display:none !important; }
  .ttk-more-body .qam-item[data-c="fh"]{ display:none !important; }   /* فال حافظ در نوار پایین است */
}

/* گوشی: دکمه‌ی «بالا» همانند دسکتاپ؛ دایره‌ی سفید با فلش خطی، راست، بالای نوار پایین */
@media (max-width:1023.98px){
  body:has(#ttkNav) #scrollTopBtn.scroll-top-btn:not(.ttk-down){
    left:0 !important; right:0 !important; margin:0 auto !important; width:44px !important; height:44px !important; padding:0 !important;
    bottom:86px !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important;
    background:#fff !important; color:#1C2433 !important; border:1px solid #ECEBE6 !important;
    box-shadow:0 8px 20px -8px rgba(15,23,42,.28), 0 1px 2px rgba(15,23,42,.08) !important;
  }
  body:has(#ttkNav) #scrollTopBtn.scroll-top-btn:not(.ttk-down) .ttk-arw{
    width:22px !important; height:22px !important; display:block !important; fill:none !important; stroke:#1C2433 !important;
    stroke-width:2.4 !important; stroke-linecap:round !important; stroke-linejoin:round !important; filter:none !important;
  }
  body:has(#ttkNav):has(.promo-banner.show) #scrollTopBtn.scroll-top-btn:not(.ttk-down){ bottom:286px !important; }
}
/* اصلاح باگ: در حالت «کاهشِ حرکت» فلشِ داخلِ دکمه پنهان می‌شد و دایره‌ی خالی می‌ماند. فقط انیمیشن قطع شود. */
@media (prefers-reduced-motion:reduce){
  body .scroll-top-btn .ttk-arw{ display:block !important; animation:none !important; }
}

/* weather menu tile */
.qam-item[data-c="wx"] .qam-ico{ background:linear-gradient(135deg,#3A9BD0,#1B5E84) !important; color:#fff !important; }
