.spb-banner {
  --spb-bg: #111827;
  --spb-fg: #ffffff;
  --spb-btn: #22c55e;
  --spb-btn-fg: #052e16;
  box-sizing: border-box;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--spb-bg);
  color: var(--spb-fg);
  font-family: system-ui, -apple-system, "SF Pro Text", Segoe UI, Roboto, sans-serif;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28);
}

.spb-banner[data-open="1"] {
  display: flex;
}

.spb-banner[data-position="bottom"] {
  bottom: 0;
}

.spb-banner[data-position="top"] {
  top: 0;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.spb-banner *,
.spb-sheet * {
  box-sizing: border-box;
}

.spb-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  flex: 0 0 44px;
}

.spb-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.spb-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.spb-sub {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.88;
}

.spb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.spb-install {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--spb-btn);
  color: var(--spb-btn-fg);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.spb-install:disabled {
  opacity: 0.65;
  cursor: wait;
}

.spb-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.spb-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: rgba(15, 23, 42, 0.55);
}

.spb-scrim[data-open="1"] {
  display: block;
}

.spb-sheet {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  z-index: 2147483002;
  background: #f4f4f5;
  color: #111827;
  border-radius: 22px;
  padding: 18px 18px 20px;
  font-family: system-ui, -apple-system, "SF Pro Text", Segoe UI, Roboto, sans-serif;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  max-height: min(86vh, 640px);
  overflow: auto;
}

.spb-sheet[data-open="1"] {
  display: block;
}

.spb-sheet[data-position="bottom"] {
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.spb-sheet[data-position="top"] {
  top: calc(12px + env(safe-area-inset-top, 0px));
}

.spb-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.spb-sheet-head img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.spb-sheet-head h3 {
  margin: 0;
  font-size: 18px;
}

.spb-sheet-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #4b5563;
}

.spb-sheet-x {
  margin-left: auto;
  border: 0;
  background: #e5e7eb;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 18px;
  cursor: pointer;
}

.spb-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.spb-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
}

.spb-num {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.spb-steps h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.spb-steps p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
}

.spb-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  vertical-align: middle;
  background: #eef2ff;
  border-radius: 8px;
}

.spb-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}

@media (min-width: 720px) {
  .spb-banner {
    left: 50%;
    right: auto;
    width: min(560px, calc(100% - 24px));
    transform: translateX(-50%);
    border-radius: 16px;
    margin: 12px 0;
    padding-bottom: 10px;
  }

  .spb-sheet {
    left: 50%;
    right: auto;
    width: min(420px, calc(100% - 24px));
    transform: translateX(-50%);
  }
}
