/* Unified mobile-only footer shared by every iBlogger page. */
.mobile-unified-footer {
  display: none;
}

@media (max-width: 620px) {
  html body.home-page.v4-page > .site-footer,
  html body.mobile-approved-page > .site-footer,
  html body.mobile-approved-page .site-footer,
  html body .mobile-pixel-footer,
  html body .mar-footer,
  html body .mar-auth-foot {
    display: none !important;
  }

  html body .mobile-unified-footer {
    position: relative;
    isolation: isolate;
    direction: rtl;
    display: block !important;
    box-sizing: border-box;
    width: calc(100% - 20px);
    max-width: 600px;
    margin: 22px auto 0;
    padding: 27px 16px max(16px, env(safe-area-inset-bottom));
    overflow: hidden;
    color: #fff;
    background:
      radial-gradient(circle at 86% -8%, rgba(128,83,244,.28), transparent 34%),
      radial-gradient(circle at 6% 110%, rgba(66,96,224,.2), transparent 38%),
      linear-gradient(150deg, #050923 0%, #080d32 56%, #0d1240 100%);
    border: 1px solid rgba(255,255,255,.09);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -14px 38px rgba(20,14,66,.12), inset 0 1px 0 rgba(255,255,255,.04);
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  }

  .mobile-unified-footer,
  .mobile-unified-footer *,
  .mobile-unified-footer *::before,
  .mobile-unified-footer *::after {
    box-sizing: border-box;
  }

  .mobile-unified-footer a {
    color: inherit;
    text-decoration: none;
  }

  .muf-brand {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .muf-logo {
    display: block;
    line-height: 0;
  }

  .muf-logo img {
    display: block;
    width: 108px;
    height: 29px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }

  .muf-brand p {
    width: min(330px, 94%);
    margin: 10px auto 0;
    color: rgba(225,228,244,.72);
    font-size: 10.5px;
    font-weight: 560;
    line-height: 1.9;
  }

  .muf-nav {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
  }

  .muf-nav > a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 66px;
    padding: 10px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 17px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  }

  .muf-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #bdb2ff;
    background: rgba(125,91,240,.15);
    border: 1px solid rgba(182,164,255,.1);
    border-radius: 13px;
  }

  .muf-nav > a:nth-child(2) .muf-icon { color: #7ee1cf; background: rgba(61,194,171,.12); }
  .muf-nav > a:nth-child(3) .muf-icon { color: #ffd064; background: rgba(215,161,44,.12); }
  .muf-nav > a:nth-child(4) .muf-icon { color: #75bdff; background: rgba(64,145,225,.12); }

  .muf-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .muf-nav strong,
  .muf-nav small {
    display: block;
    min-width: 0;
  }

  .muf-nav strong {
    color: #fff;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.45;
  }

  .muf-nav small {
    margin-top: 3px;
    color: rgba(208,213,235,.58);
    font-size: 8px;
    font-weight: 560;
    line-height: 1.45;
  }

  .muf-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .muf-actions a {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
  }

  .muf-actions .is-primary {
    background: linear-gradient(135deg, #7351ef, #a05bf2);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 10px 22px rgba(115,81,239,.22), inset 0 1px 0 rgba(255,255,255,.2);
  }

  .muf-actions .is-secondary {
    color: #d9dcf0;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
  }

  .muf-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
    padding-top: 13px;
    color: rgba(184,191,221,.5);
    border-top: 1px solid rgba(255,255,255,.075);
    font-size: 8px;
    line-height: 1.5;
  }

  .muf-bottom a {
    color: rgba(220,224,242,.72);
    font-weight: 750;
  }
}

@media (max-width: 350px) {
  html body .mobile-unified-footer {
    width: calc(100% - 12px);
    padding-inline: 11px;
    border-radius: 24px 24px 0 0;
  }

  .muf-nav { gap: 6px; }
  .muf-nav > a { grid-template-columns: 34px minmax(0, 1fr); gap: 7px; padding: 8px; }
  .muf-icon { width: 34px; height: 34px; border-radius: 11px; }
  .muf-nav strong { font-size: 9.5px; }
  .muf-nav small { font-size: 7px; }
}

/* Theme-coherent footer layer. Geometry stays shared; colors follow the site theme. */
@media (max-width: 620px) {
  html body .mobile-unified-footer {
    --muf-bg: #f2f3fa;
    --muf-surface: rgba(255,255,255,.88);
    --muf-surface-hover: #fff;
    --muf-ink: #171a35;
    --muf-muted: #626a84;
    --muf-faint: #626a84;
    --muf-line: rgba(32,37,79,.10);
    --muf-accent: #695be7;
    --muf-accent-soft: #efedff;
    padding-top: 28px;
    color: var(--muf-ink) !important;
    background:
      radial-gradient(circle at 86% -8%, color-mix(in srgb,var(--muf-accent) 14%,transparent), transparent 35%),
      radial-gradient(circle at 5% 112%, rgba(44,178,146,.09), transparent 39%),
      linear-gradient(150deg,#f9f9fd 0%,var(--muf-bg) 100%) !important;
    border-color: var(--muf-line) !important;
    box-shadow: 0 -14px 38px rgba(23,26,68,.08),inset 0 1px 0 rgba(255,255,255,.72) !important;
  }
  html[data-theme="dark"] body .mobile-unified-footer {
    --muf-bg: #0b1025;
    --muf-surface: rgba(255,255,255,.055);
    --muf-surface-hover: rgba(255,255,255,.085);
    --muf-ink: #f6f7ff;
    --muf-muted: #b4bad0;
    --muf-faint: #8f98b6;
    --muf-line: rgba(225,228,255,.10);
    --muf-accent: #a59aff;
    --muf-accent-soft: rgba(155,145,255,.15);
    background:
      radial-gradient(circle at 86% -8%,rgba(155,145,255,.24),transparent 35%),
      radial-gradient(circle at 5% 112%,rgba(66,213,170,.12),transparent 39%),
      linear-gradient(150deg,#090d20 0%,#0d122a 58%,#111630 100%) !important;
    box-shadow: 0 -16px 42px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04) !important;
  }
  .muf-logo img { width:112px;height:30px;filter:none !important; }
  html[data-theme="dark"] .muf-logo img { filter:brightness(0) invert(1) !important; }
  .muf-brand p {
    width:min(350px,96%);
    margin-top:11px;
    color:var(--muf-muted) !important;
    font-size:12px;
    line-height:1.9;
  }
  .muf-nav { gap:9px;margin-top:21px; }
  .muf-nav>a {
    grid-template-columns:40px minmax(0,1fr);
    gap:10px;
    min-height:70px;
    color:var(--muf-ink) !important;
    background:var(--muf-surface) !important;
    border-color:var(--muf-line) !important;
    border-radius:18px;
    box-shadow:0 7px 22px rgba(23,26,68,.045),inset 0 1px 0 rgba(255,255,255,.12);
    transition:border-color .2s ease,background-color .2s ease,transform .2s ease;
  }
  .muf-nav>a:hover {
    color:var(--muf-ink) !important;
    background:var(--muf-surface-hover) !important;
    border-color:color-mix(in srgb,var(--muf-accent) 26%,var(--muf-line)) !important;
    transform:translateY(-1px);
  }
  .muf-icon {
    width:40px;height:40px;
    color:var(--muf-accent);
    background:var(--muf-accent-soft);
    border-color:color-mix(in srgb,var(--muf-accent) 13%,transparent);
  }
  .muf-nav>a:nth-child(2) .muf-icon { color:#159b78;background:rgba(30,181,143,.12); }
  html[data-theme="dark"] .muf-nav>a:nth-child(2) .muf-icon { color:#63daba; }
  .muf-nav>a:nth-child(3) .muf-icon { color:#c58a00;background:rgba(226,170,36,.13); }
  html[data-theme="dark"] .muf-nav>a:nth-child(3) .muf-icon { color:#f0c45b; }
  .muf-nav>a:nth-child(4) .muf-icon { color:#317fc5;background:rgba(64,145,225,.12); }
  html[data-theme="dark"] .muf-nav>a:nth-child(4) .muf-icon { color:#75bdff; }
  .muf-icon svg { width:21px;height:21px; }
  .muf-nav strong { color:var(--muf-ink) !important;font-size:12px; }
  .muf-nav small { color:var(--muf-muted) !important;font-size:9.5px;line-height:1.5; }
  .muf-actions { gap:9px;margin-top:13px; }
  .muf-actions a { min-height:44px;font-size:11.5px; }
  .muf-actions .is-primary {
    color:#fff !important;
    background:linear-gradient(135deg,#695be7,#8974ef) !important;
  }
  .muf-actions .is-secondary {
    color:var(--muf-ink) !important;
    background:var(--muf-surface) !important;
    border-color:var(--muf-line) !important;
  }
  .muf-bottom {
    color:var(--muf-faint) !important;
    border-color:var(--muf-line) !important;
    font-size:10px;
    line-height:1.6;
  }
  .muf-bottom a { color:var(--muf-muted) !important; }
}

@media (max-width:350px) {
  .muf-nav>a { grid-template-columns:35px minmax(0,1fr);gap:7px; }
  .muf-icon { width:35px;height:35px; }
  .muf-nav strong { font-size:10.5px; }
  .muf-nav small { font-size:8.5px; }
}
