/* Deenpedia মোবাইল অ্যাপ-শেল: ছোট অ্যাপ বার, নিচের ট্যাব বার, মেনু শিট, ভাঁজ করা ফুটার।
   শুধু ৮৬০px বা ছোট পর্দায় চালু; ডেস্কটপের হেডার ও ফুটার যেমন ছিল তেমনই থাকে। */
.tb-ic { display: none; }
.dpm-tabs, .dpm-sheet, .dpm-scrim, .dpm-prog, .dpm-ttl, .dpm-up { display: none; }

/* ডেস্কটপ হেডার (৪ নভেম্বর ২০২৬): মেনুর সব বোতাম একই উচ্চতা ও একই আকারের পিল; রাত/দিন এখন চাঁদ/সূর্য আইকন */
@media (min-width: 861px) {
  header.top nav.main { gap: 6px !important; align-items: center; }
  header.top nav.main a { display: inline-flex !important; align-items: center; justify-content: center; height: 36px; padding: 0 12px !important; border-radius: 10px !important;
    border: 1px solid rgba(226,192,122,.22); background: rgba(255,255,255,.04); font-size: .88rem !important; line-height: 1 !important; white-space: nowrap; opacity: .92 !important;
    transition: background .15s, border-color .15s; }
  header.top nav.main a:hover { background: rgba(255,255,255,.1) !important; border-color: rgba(226,192,122,.55); opacity: 1 !important; }
  header.top nav.main a[aria-current="page"], header.top nav.main a.on { background: rgba(226,192,122,.16) !important; border-color: #C8973A; color: #F6F8F6; opacity: 1 !important; }
  header.top .dps-btn { height: 36px !important; }
  header.top .bar, header.top > .wrap { max-width: 1220px !important; }
  header.top #themeBtn { width: 36px; height: 36px; padding: 0 !important; display: inline-grid; place-items: center; flex: none; border-radius: 10px !important;
    border: 1px solid rgba(226,192,122,.35) !important; font-size: 0 !important; cursor: pointer; transition: background .15s, border-color .15s; }
  header.top #themeBtn:hover { background: rgba(255,255,255,.1); border-color: rgba(226,192,122,.7) !important; }
  header.top #themeBtn .tb-t { display: none; }
  header.top #themeBtn .tb-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  html:not([data-theme="dark"]) header.top #themeBtn .tb-moon, html[data-theme="dark"] header.top #themeBtn .tb-sun { display: block; }
}
@media (min-width: 900px) {
  header.top .bar, header.top > .wrap { flex-wrap: nowrap !important; gap: 10px !important; }
  header.top nav.main { flex: 0 1 auto; min-width: 0; }
}
/* এক শব্দের নাম, তাই সব বোতাম সমান চওড়া */
@media (min-width: 900px) { header.top nav.main a { min-width: 82px; } }
@media (min-width: 1180px) { header.top nav.main a { min-width: 92px; } }
@media (min-width: 861px) and (prefers-color-scheme: dark) { html:not([data-theme]) header.top #themeBtn .tb-moon { display: none; } html:not([data-theme]) header.top #themeBtn .tb-sun { display: block; } }
@media (prefers-reduced-motion: no-preference) { header.top #themeBtn .tb-ic { animation: dpm-spin .35s ease; } @keyframes dpm-spin { from { transform: rotate(-60deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } } }

/* হোমের ৬টা দ্রুত-লিংক টাইল হেডার মেনু ও ট্যাব বারেরই পুনরাবৃত্তি, তাই লুকানো (৪ নভেম্বর ২০২৬, মালিকের নির্দেশ) */
#app .quick { display: none !important; }

@media (max-width: 860px) {
  /* অ্যাপ বার */
  header.top { transition: transform .25s ease; box-shadow: 0 1px 0 rgba(200,151,58,.35); }
  header.top.dpm-hide { transform: translateY(-100%); }
  header.top .bar, header.top > .wrap { flex-wrap: nowrap !important; gap: 4px !important; min-height: 56px; padding-block: 4px !important; display: flex; align-items: center; }
  header.top nav.main { display: none !important; }
  header.top .brand { gap: 8px; min-height: 44px; min-width: 0; flex: 1; margin-right: 0; }
  header.top .brand svg, header.top .brand img { width: 32px; height: 32px; }
  header.top .brand small { display: none !important; }
  header.top .brand b { font-size: 1.2rem !important; }
  .dpm-ttl { display: block; flex: 1; min-width: 0; font-weight: 600; font-size: 1rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; pointer-events: none; }
  header.top.dpm-titled .brand > span { display: none; }
  header.top.dpm-titled .brand { flex: none; }
  header.top.dpm-titled .dpm-ttl { opacity: 1; }
  header.top .dps-btn, header.top #themeBtn { width: 44px !important; height: 44px !important; padding: 0 !important; border: 0 !important; border-radius: 12px !important;
    background: transparent !important; display: grid !important; place-items: center; color: var(--head-ink, #F6F8F6); flex: none; -webkit-tap-highlight-color: transparent; }
  header.top .dps-btn svg { width: 21px !important; height: 21px !important; }
  header.top #themeBtn .tb-t { display: none; }
  header.top #themeBtn { font-size: 0 !important; }
  header.top #themeBtn .tb-ic { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  html:not([data-theme="dark"]) header.top #themeBtn .tb-moon, html[data-theme="dark"] header.top #themeBtn .tb-sun { display: block; }
  @media (prefers-color-scheme: dark) { html:not([data-theme]) header.top #themeBtn .tb-moon { display: none; } html:not([data-theme]) header.top #themeBtn .tb-sun { display: block; } }
  header.top .dps-btn:active, header.top #themeBtn:active, .dpm-tab:active .dpm-pill, .dpm-tile:active { transform: scale(.94); }
  .dpm-prog { display: block; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: #C8973A; }

  /* নিচের ট্যাব বার */
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: none !important; }
  .dpm-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: var(--surface, #fff); border-top: 1px solid var(--line, #E1E8E4);
    padding: 6px max(4px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
    transition: transform .25s ease; font-family: var(--body, "Noto Sans Bengali", "Hind Siliguri", system-ui, sans-serif); }
  body.dpm-tabs-off .dpm-tabs { transform: translateY(105%); }
  .dpm-tab { display: grid; justify-items: center; gap: 1px; min-height: 50px; padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--muted, #4A5C56); font-weight: 500; font-size: .74rem; line-height: 1.3; font-family: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .dpm-pill { width: 54px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s, transform .12s; }
  .dpm-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .dpm-tab[aria-current="page"] { color: var(--accent, #0F5C4A); font-weight: 700; }
  .dpm-tab[aria-current="page"] .dpm-pill { background: var(--accent-soft, #E3EFEA); box-shadow: inset 0 -2px 0 #C8973A; }
  .dpm-tab:focus-visible, .dpm-tile:focus-visible, .dpm-x:focus-visible, .dpm-sw:focus-visible { outline: 2px solid #C8973A; outline-offset: 2px; }

  /* মেনু শিট */
  .dpm-scrim { display: block; position: fixed; inset: 0; z-index: 950; background: rgba(5,25,20,.5); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .dpm-sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 960; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface, #fff); color: var(--ink, #13241F); border-radius: 22px 22px 0 0; transform: translateY(105%); visibility: hidden;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s; container-type: inline-size;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    font-family: var(--body, "Noto Sans Bengali", "Hind Siliguri", system-ui, sans-serif); line-height: 1.5; }
  body.dpm-open { overflow: hidden; }
  body.dpm-open .dpm-scrim { opacity: 1; pointer-events: auto; }
  body.dpm-open .dpm-sheet { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  .dpm-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line, #E1E8E4); margin: 4px auto 10px; }
  .dpm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .dpm-head b { font-size: 1.05rem; }
  .dpm-x { width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; color: var(--muted, #4A5C56); display: grid; place-items: center; cursor: pointer; }
  .dpm-x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .dpm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dpm-tile { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 10px; border-radius: 14px; background: var(--bg, #F6F8F6);
    border: 1px solid var(--line, #E1E8E4); color: var(--ink, #13241F); text-decoration: none; font-weight: 600; font-size: .9rem; line-height: 1.35; transition: transform .12s; }
  .dpm-tile[aria-current="page"] { border-color: var(--accent, #0F5C4A); box-shadow: inset 0 0 0 1px var(--accent, #0F5C4A); }
  .dpm-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft, #E3EFEA); color: var(--accent, #0F5C4A); }
  .dpm-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  @container (max-width: 340px) { .dpm-tile { flex-direction: column; align-items: flex-start; gap: 6px; } }
  .dpm-sec { margin-top: 16px; }
  .dpm-sec h2 { all: unset; display: block; font-size: .78rem; font-weight: 700; color: var(--gold, #8A6420); margin-bottom: 2px; }
  .dpm-sec a { display: flex; align-items: center; justify-content: space-between; min-height: 46px; border-bottom: 1px solid var(--line, #E1E8E4); color: var(--ink, #13241F); text-decoration: none; font-size: .95rem; }
  .dpm-sec a::after { content: "›"; color: var(--muted, #4A5C56); font-size: 1.2rem; line-height: 1; }
  .dpm-sw { width: 100%; min-height: 52px; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 14px;
    background: var(--bg, #F6F8F6); border: 1px solid var(--line, #E1E8E4); color: var(--ink, #13241F); font-weight: 600; font-size: .95rem; font-family: inherit; cursor: pointer; }
  .dpm-knob { width: 44px; height: 26px; border-radius: 13px; background: var(--line, #E1E8E4); position: relative; flex: none; transition: background .2s; }
  .dpm-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .2s; }
  .dpm-sw[aria-checked="true"] .dpm-knob { background: var(--accent, #0F5C4A); }
  .dpm-sw[aria-checked="true"] .dpm-knob::after { left: 21px; }

  /* ফুটার: ট্যাব বারের জন্য নিচে জায়গা */
  footer.dpf { margin-top: 32px !important; }

  /* ভাসমান "উপরে যান": লম্বা পাতায় একটু নামলে দেখা যায়, চারপাশের রিং দেখায় কতটা পড়া হলো */
  .dpm-up { display: grid; place-items: center; position: fixed; z-index: 880; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
    right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    background: var(--head, #0A3F33); color: #F6F8F6; box-shadow: 0 6px 18px rgba(5,25,20,.3); -webkit-tap-highlight-color: transparent;
    opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .2s, transform .2s, bottom .25s ease; }
  .dpm-up.dpm-show { opacity: 1; transform: none; pointer-events: auto; }
  .dpm-up:active { transform: scale(.92); }
  .dpm-up:focus-visible { outline: 2px solid #C8973A; outline-offset: 3px; }
  .dpm-up svg { position: absolute; inset: 0; width: 48px; height: 48px; }
  .dpm-up .dpm-ring-bg { fill: none; stroke: rgba(226,192,122,.25); stroke-width: 3; }
  .dpm-up .dpm-ring { fill: none; stroke: #E2C07A; stroke-width: 3; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 24px 24px; }
  .dpm-up .dpm-arrow { position: static; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  body.dpm-tabs-off .dpm-up { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  body.dpm-dock .dpm-up { bottom: calc(136px + env(safe-area-inset-bottom, 0px)); }
  body.dpm-dock.dpm-tabs-off .dpm-up { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  body.dpm-open .dpm-up { opacity: 0; pointer-events: none; }

  /* অন্য ভাসমান জিনিস ট্যাব বারের উপরে থাকবে */
  .nb-dock { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; transition: bottom .25s ease, opacity .2s, transform .2s; }
  body.dpm-tabs-off .nb-dock { bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  header.top, .dpm-tabs, .dpm-sheet, .dpm-scrim, .dpm-pill, .dpm-up, .dpm-tile, .dpm-knob, .dpm-knob::after { transition: none !important; }
}
@media print { .dpm-tabs, .dpm-sheet, .dpm-scrim, .dpm-up { display: none !important; } }
