/* 打赏赞助 · 前台 */
.em-tip-btn {
  z-index: 1200;
  padding: 0.65rem 1.15rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(220, 38, 38, 0.45),
    0 2px 4px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.em-tip-btn--fixed {
  position: fixed;
}

.em-tip-btn--inline {
  display: inline-block;
  margin: 0.5rem 0;
}

.em-tip-pos-home-tl,
.em-tip-pos-log-tl,
.em-tip-pos-site-tl {
  top: 1.25rem;
  left: 1.25rem;
  right: auto;
  bottom: auto;
}

.em-tip-pos-home-tr,
.em-tip-pos-log-tr,
.em-tip-pos-site-tr {
  top: 1.25rem;
  right: 1.25rem;
  left: auto;
  bottom: auto;
}

.em-tip-pos-home-bl,
.em-tip-pos-log-bl,
.em-tip-pos-site-bl {
  bottom: 1.25rem;
  left: 1.25rem;
  right: auto;
  top: auto;
}

.em-tip-pos-home-br,
.em-tip-pos-log-br,
.em-tip-pos-site-br {
  bottom: 5.5rem;
  right: 1.25rem;
  left: auto;
  top: auto;
}

.em-tip-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    0 8px 22px rgba(220, 38, 38, 0.5),
    0 4px 8px rgba(15, 23, 42, 0.14);
}

.em-tip-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.em-tip-inline-wrap {
  margin: 0.75rem 0 0.25rem;
  text-align: center;
}

.em-tip-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.em-tip-modal[hidden] {
  display: none !important;
}

.em-tip-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.em-tip-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 16px;
  background: var(--hl-box-bg, #fff);
  color: var(--hl-text-color, #1e293b);
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.em-tip-modal__close {
  position: absolute;
  top: 0.35rem;
  right: 0.55rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.em-tip-modal__title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #dc2626;
}

.em-tip-modal__qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.75rem;
  border-radius: 10px;
}

.em-tip-modal__remark {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
  text-align: left;
  word-break: break-all;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

body.em-tip-open {
  overflow: hidden;
}

.em-tip-modal--multi .em-tip-modal__panel {
  max-width: min(100%, 360px);
}

.em-tip-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0 0.15rem;
}

.em-tip-tabs__btn {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.em-tip-tabs__btn:hover {
  border-color: #dc2626;
  background: #fef2f2;
}

.em-tip-tabs__btn.is-active {
  border-color: #dc2626;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
}

.em-tip-panels {
  min-height: 200px;
}

.em-tip-panel {
  display: none;
}

.em-tip-panel.is-active {
  display: block;
}

.em-tip-panel[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .em-tip-btn--fixed.em-tip-pos-home-br,
  .em-tip-btn--fixed.em-tip-pos-log-br,
  .em-tip-btn--fixed.em-tip-pos-site-br {
    right: 0.85rem;
    bottom: 4.75rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.88rem;
  }
}
