.spfd-footer {
  display: none;
}

@media screen and (max-width: 768px) {
  .spfd-footer {
    display: block;
    width: 100%;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
  }

  .spfd-footer.is-fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  body {
    padding-bottom: calc(var(--spfd-safe-pad, 0px));
  }

  .spfd-footer.is-fixed ~ * {
    /* no-op: body padding handles overlap */
  }

  .spfd-inner {
    width: 100%;
  }

  .spfd-row {
    display: flex;
    width: 100%;
    align-items: stretch;
  }

  .spfd-row + .spfd-row {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .spfd-btn {
    flex: 1 1 calc(100% / var(--spfd-cols, 3));
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    background: transparent;
  }

  .spfd-btn:active {
    background: rgba(0, 0, 0, 0.03);
  }

  .spfd-btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
  }

  .spfd-btn-img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }

  .spfd-btn-ph {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e9ecef, #f6f7f7);
  }

  /* fixed時のコンテンツ被り回避（概算で行数に応じる） */
  .spfd-footer.is-fixed {
    --spfd-row-height: 56px;
    --spfd-safe-pad: calc(
      (var(--spfd-row-height) * var(--spfd-rows, 1)) + env(safe-area-inset-bottom, 0px)
    );
  }

  body {
    padding-bottom: calc(var(--spfd-safe-pad, 0px));
  }
}

