/* Footer tip / donate modal — aligned with yanyun
   Structure: footer > .footer-inner + .footer-support (+ .footer-legal) */

.footer-support {
  width: 100%;
  max-width: var(--max, 1120px);
  margin: 8px auto 0;
  padding: 18px 0 4px;
  box-sizing: border-box;
}
.footer-support:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.footer-legal {
  width: 100%;
  max-width: var(--max, 1120px);
  margin: 0.85rem auto 0;
  padding: 0.85rem 0 0;
  box-sizing: border-box;
  text-align: center;
  border-top: 1px solid var(--line, rgba(196, 181, 154, 0.14));
}
.footer-legal:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.footer-legal-copy {
  margin: 0 auto 0.55rem;
  max-width: 44em;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--fog, #8a9388);
}
.footer-beian {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--fog, #8a9388);
}

.footer-support-inner {
  text-align: center;
  padding: 16px 18px 8px;
  border-top: 1px solid rgba(196, 181, 154, 0.22);
}
.footer-support-title {
  margin: 0 0 6px;
  font-family: var(--font-display, "Rajdhani", "Noto Sans SC", sans-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--sand, #c4b59a);
}
.footer-support-disclaimer {
  margin: 0 auto 12px;
  max-width: 36em;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--sand, #c4b59a);
  background: rgba(196, 181, 154, 0.12);
  border: 1px solid rgba(196, 181, 154, 0.35);
  border-radius: 6px;
}
.footer-support-msg {
  margin: 0 auto 14px;
  max-width: 28em;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim, #9a9488);
}
.footer-support-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn-like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sand, #c4b59a);
  background: transparent;
  border: 1px solid rgba(196, 181, 154, 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-like:hover {
  color: var(--bg, #0a0c0b);
  background: var(--sand, #c4b59a);
  border-color: var(--sand, #c4b59a);
}
.btn-like:active {
  transform: scale(0.98);
}
.btn-like-icon {
  flex: 0 0 auto;
}

body.donate-modal-open {
  overflow: hidden;
}

.donate-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.donate-modal[hidden] {
  display: none !important;
}
.donate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
}
.donate-modal-panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 28px 22px 22px;
  text-align: center;
  background: var(--bg-elev, #121614);
  border: 1px solid rgba(196, 181, 154, 0.28);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.donate-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--fog, #8a9388);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.donate-modal-close:hover {
  color: var(--sand, #c4b59a);
}
.donate-modal-title {
  margin: 0 0 6px;
  font-family: var(--font-display, "Rajdhani", "Noto Sans SC", sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--sand, #c4b59a);
}
.donate-modal-hint {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-dim, #9a9488);
}
.donate-modal-disclaimer {
  margin: 12px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  color: var(--sand, #c4b59a);
  background: rgba(196, 181, 154, 0.12);
  border: 1px solid rgba(196, 181, 154, 0.35);
  border-radius: 6px;
}
.donate-modal-disclaimer[hidden] {
  display: none;
}
.donate-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.donate-amount-btn {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 10px 8px;
  font: inherit;
  color: var(--text, #ebe6dc);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(196, 181, 154, 0.28);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.donate-amount-btn:hover {
  border-color: rgba(196, 181, 154, 0.55);
}
.donate-amount-btn.is-active {
  color: #1a1008;
  background: var(--signal, #d4782e);
  border-color: var(--signal, #d4782e);
}
.donate-amount-num {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font-display, "Rajdhani", sans-serif);
}
.donate-amount-unit {
  font-size: 12px;
  opacity: 0.85;
}
.donate-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1a1008;
  background: var(--signal, #d4782e);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.donate-pay-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.donate-pay-btn:not(:disabled):hover {
  filter: brightness(1.05);
}
.donate-modal-status {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-dim, #9a9488);
}
.donate-modal-status.is-error {
  color: var(--danger, #c44a3a);
}

/* ----- Pay page (yanyun-compatible Native QR flow) ----- */
.pay-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg, #0a0c0b);
  color: var(--text, #ebe6dc);
  font-family: var(--font-body, "Noto Sans SC", sans-serif);
}
.pay-header {
  border-bottom: 1px solid var(--line, rgba(196, 181, 154, 0.14));
}
.pay-header-inner {
  max-width: var(--max, 1120px);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.pay-logo {
  font-family: var(--font-display, "Rajdhani", "Noto Sans SC", sans-serif);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sand, #c4b59a);
  text-decoration: none;
}
.pay-logo span {
  color: var(--signal, #d4782e);
  font-size: 0.85em;
  margin-left: 0.25rem;
}
.pay-back-link {
  font-size: 13px;
  color: var(--sand, #c4b59a);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pay-main {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(212, 120, 46, 0.12), transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(107, 124, 58, 0.1), transparent 45%),
    var(--bg, #0a0c0b);
}
.pay-card {
  position: relative;
  width: min(420px, 100%);
  text-align: center;
  padding: 36px 22px 24px;
  background: var(--bg-elev, #121614);
  border: 1px solid var(--line, rgba(196, 181, 154, 0.14));
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.pay-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--fog, #8a9388);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.pay-close:hover {
  color: var(--sand, #c4b59a);
}
.pay-title {
  margin: 0 0 8px;
  font-family: var(--font-display, "Rajdhani", "Noto Sans SC", sans-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sand, #c4b59a);
}
.pay-amount {
  margin: 0 0 10px;
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text, #ebe6dc);
}
.pay-hint {
  margin: 0 0 18px;
  color: var(--text-dim, #9a9488);
  font-size: 0.92rem;
}
.pay-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 14px;
}
.pay-qr {
  width: 240px;
  height: 240px;
  max-width: 72vw;
  max-height: 72vw;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-sizing: border-box;
}
.pay-status {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--text-dim, #9a9488);
}
.pay-status.is-error {
  color: var(--danger, #c44a3a);
}
.pay-order {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--text-dim, #9a9488);
  word-break: break-all;
}
.pay-disclaimer {
  margin: 12px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--sand, #c4b59a);
  background: rgba(196, 181, 154, 0.12);
  border: 1px solid rgba(196, 181, 154, 0.35);
  border-radius: 6px;
  text-align: left;
}
.pay-disclaimer[hidden],
.pay-status[hidden],
.pay-order[hidden],
.pay-qr[hidden] {
  display: none;
}
.pay-actions {
  margin: 18px 0 0;
}
.pay-reselect {
  color: var(--sand, #c4b59a);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.9rem;
}

/* Paywall on: show paid CTAs until unlocked (pay.js toggles hidden) */
html.pack-free [data-pack-locked],
html.pack-free .map-unlock-bar {
  display: none !important;
}
html.pack-free .cat-cta.paid[data-pack-locked] {
  display: none !important;
}
html.pack-paywall .cat-cta.paid {
  display: inline-flex;
}
html.pack-paywall .cat-cta.paid[hidden] {
  display: none !important;
}
html.pack-free [data-pack-unlocked] {
  display: block !important;
}
html.pack-free [data-pack-unlocked][hidden] {
  display: block !important;
}
html.pack-free span[data-pack-unlocked],
html.pack-free a[data-pack-unlocked],
html.pack-free button[data-pack-unlocked] {
  display: inline-flex !important;
}
html.pack-free .page-sub span[data-pack-unlocked] {
  display: inline !important;
}
