/* Acertijo del día — apoya */
:root {
  --bg: hsl(220 20% 98.5%);
  --fg: hsl(240 12% 10%);
  --muted: hsl(240 5% 44%);
  --subtle: hsl(240 4% 60%);
  --primary: hsl(250 85% 60%);
  --border: hsl(240 6% 88%);
}
[data-theme="dark"] {
  --bg: hsl(240 12% 7%);
  --fg: hsl(240 8% 95%);
  --muted: hsl(240 6% 62%);
  --subtle: hsl(240 4% 42%);
  --primary: hsl(250 90% 72%);
  --border: hsl(240 5% 17%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 50% at 50% -5%, hsl(250 85% 60% / 0.07), transparent 65%);
}
[data-theme="dark"] body::before {
  background: radial-gradient(ellipse 90% 50% at 50% -5%, hsl(250 85% 60% / 0.05), transparent 65%);
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

/* ═══════════════════════════════════════════
   BRAND
   ═══════════════════════════════════════════ */
.apoya-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4.2rem;
  margin-bottom: 3.6rem;
}
.apoya-brand a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  transition: opacity 0.16s ease;
}
.apoya-brand a:hover { opacity: 0.6; }

.apoya-brand-icon { width: 62px; height: 62px; }
.apoya-brand-icon .mark-body { fill: var(--fg); }
.apoya-brand-icon .mark-diamond { fill: var(--bg); }

.apoya-brand-wordmark {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1;
  text-transform: lowercase;
  color: var(--fg);
}
.apoya-brand-wordmark .wm-d { font-weight: 300; opacity: 0.38; }

/* ═══════════════════════════════════════════
   MAIN
   ═══════════════════════════════════════════ */
.apoya-main {
  width: min(460px, calc(100% - 2.4rem));
  margin-inline: auto;
  padding-bottom: 2.4rem;
  flex: 1;
}

/* ═══════════════════════════════════════════
   HEADLINE
   ═══════════════════════════════════════════ */
.apoya-headline {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: clamp(2rem, 6.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.14;
  text-align: center;
  color: var(--fg);
  margin-bottom: 1.4rem;
  text-wrap: balance;
}

/* ═══════════════════════════════════════════
   INTRO
   ═══════════════════════════════════════════ */
.apoya-intro,
.apoya-copy {
  font-size: 0.93rem;
  line-height: 1.76;
  color: var(--muted);
  text-align: center;
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 2.9rem;
}
.apoya-copy p + p {
  margin-top: 1.05rem;
}
.apoya-copy p:last-child {
  color: var(--fg);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   SUPPORT BLOCK
   ═══════════════════════════════════════════ */
@keyframes apoyaIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.apoya-block {
  width: min(100%, 420px);
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid hsl(240 6% 88% / 0.72);
  border-radius: 16px;
  padding: 0.7rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 14px 36px rgba(25, 20, 48, 0.06);
  animation: apoyaIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 1.7rem;
}

.apoya-mobile-support {
  display: none;
}
[data-theme="dark"] .apoya-block {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.045) inset,
    0 14px 34px rgba(0, 0, 0, 0.24);
}

.apoya-kofi-panel {
  width: min(100%, 390px);
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid hsl(240 6% 88% / 0.78);
  border-radius: 12px;
  background: #f9f9f9;
  box-shadow: 0 10px 24px rgba(25, 20, 48, 0.055);
}

[data-theme="dark"] .apoya-kofi-panel {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.apoya-kofi-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 680px;
  border: 0;
  padding: 4px;
  background: #f9f9f9;
}

.apoya-stripe-panel {
  width: min(100%, 400px);
  min-height: 220px;
  margin-inline: auto;
  padding: 1rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid hsl(240 6% 88% / 0.78);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.68);
  box-shadow: 0 10px 24px rgba(25, 20, 48, 0.055);
}

.apoya-stripe-panel stripe-buy-button {
  display: block;
  width: 100%;
  max-width: 390px;
}

[data-theme="dark"] .apoya-stripe-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.apoya-block.apoya-block--stripe {
  width: min(100%, 400px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  align-items: center;
}

[data-theme="dark"] .apoya-block.apoya-block--stripe {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.apoya-block--stripe .apoya-stripe-panel {
  width: 100%;
  max-width: 400px;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .apoya-block--stripe .apoya-stripe-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.apoya-block--stripe .apoya-stripe-panel stripe-buy-button {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  filter: drop-shadow(0 10px 22px rgba(25, 20, 48, 0.08));
}

[data-theme="dark"] .apoya-block--stripe .apoya-stripe-panel stripe-buy-button {
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.3));
}

.apoya-stripe-panel[hidden],
.apoya-stripe-fallback-card[hidden] {
  display: none;
}

.apoya-stripe-fallback-card {
  width: min(100%, 320px);
  margin-inline: auto;
  padding: 1.15rem;
  border: 1px solid hsl(240 6% 88% / 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(25, 20, 48, 0.065);
  text-align: center;
}

.apoya-stripe-fallback-card p {
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.apoya-stripe-fallback-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.apoya-stripe-fallback-button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

[data-theme="dark"] .apoya-stripe-fallback-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.apoya-stripe-noscript {
  width: min(100%, 320px);
  margin-inline: auto;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: center;
}

.apoya-stripe-noscript a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.apoya-mobile-support h2 {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.52rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--fg);
  text-align: center;
  margin-bottom: 0.65rem;
}

.apoya-mobile-support p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  text-align: center;
}

.apoya-mobile-actions {
  display: grid;
  gap: 0.7rem;
  margin: 1.15rem 0 0.8rem;
}

.apoya-mobile-primary,
.apoya-mobile-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 11px;
  font-size: 0.94rem;
  font-weight: 760;
  letter-spacing: 0;
  text-align: center;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.apoya-mobile-primary {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  box-shadow: 0 12px 26px rgba(25, 20, 48, 0.14);
}

.apoya-mobile-primary:hover {
  transform: translateY(-1px);
  background: hsl(240 12% 16%);
}

.apoya-mobile-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid transparent;
  min-height: 38px;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.apoya-mobile-secondary:hover {
  transform: translateY(-1px);
  border-color: hsl(250 85% 60% / 0.42);
  background: hsl(250 85% 60% / 0.055);
}

.apoya-mobile-note {
  font-size: 0.74rem !important;
  line-height: 1.5 !important;
  color: var(--subtle) !important;
  margin-top: 0.15rem;
}

[data-theme="dark"] .apoya-mobile-primary {
  background: hsl(240 8% 94%);
  border-color: hsl(240 8% 94%);
  color: hsl(240 12% 9%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .apoya-mobile-primary:hover {
  background: #fff;
}

[data-theme="dark"] .apoya-mobile-secondary {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

[data-theme="dark"] .apoya-mobile-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

/* ─── Button ─── */
.apoya-btn-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.3rem;
  border-radius: 12px;
  background: #ffffff;
  color: hsl(252 28% 14%);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
  margin-bottom: 0;
}
.apoya-btn-main:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.12);
  background: hsl(252 40% 97%);
}
.apoya-btn-main:active { transform: translateY(0); transition-duration: 60ms; }
.apoya-btn-main svg { flex-shrink: 0; opacity: 0.4; }

[data-theme="dark"] .apoya-btn-main {
  background: hsl(252 20% 18%);
  color: hsl(252 10% 92%);
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .apoya-btn-main:hover {
  background: hsl(252 24% 22%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.48), 0 1px 2px rgba(0, 0, 0, 0.24);
}

/* ─── Divider ─── */
.apoya-block-divider {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: 0.75rem auto 0.55rem;
  flex-shrink: 0;
}

.apoya-fallback {
  margin-bottom: 0.36rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}

.apoya-fallback-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ─── Privacy note ─── */
.apoya-privacy {
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--subtle);
  text-align: center;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   FINAL NOTE
   ═══════════════════════════════════════════ */
.apoya-final {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.04rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  opacity: 0.72;
  margin-bottom: 1.75rem;
}

/* ═══════════════════════════════════════════
   BACK LINK
   ═══════════════════════════════════════════ */
.apoya-back {
  display: block;
  text-align: center;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--subtle);
  transition: color 0.14s ease;
}
.apoya-back:hover { color: var(--fg); }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.apoya-footer {
  text-align: center;
  padding: 1.8rem 1rem 2.6rem;
}
.apoya-footer p {
  font-size: 0.65rem;
  color: var(--subtle);
  opacity: 0.4;
}
.footer-easter { transition: opacity 0.14s; }
.footer-easter:hover { opacity: 1; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .apoya-brand { padding-top: 3.2rem; margin-bottom: 3rem; }
  .apoya-brand-icon { width: 56px; height: 56px; }
  .apoya-brand-wordmark { font-size: 1.42rem; }
  .apoya-main { width: calc(100% - 1rem); }
  .apoya-headline { font-size: 1.9rem; }
  .apoya-intro,
  .apoya-copy { margin-bottom: 2.25rem; }
  .apoya-block { padding: 0.5rem; border-radius: 14px; margin-bottom: 1.5rem; }
  .apoya-btn-main { padding: 0.9rem 1.2rem; font-size: 0.9rem; }
  .apoya-kofi-panel { width: min(100%, 390px); border-radius: 10px; }
  .apoya-kofi-frame { height: 620px; }
  .apoya-block-divider { margin-top: 0.62rem; }
}

@media (max-width: 700px) {
  .apoya-block {
    width: min(100%, 420px);
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.58);
  }
  [data-theme="dark"] .apoya-block {
    background: rgba(255, 255, 255, 0.055);
  }
  .apoya-kofi-panel,
  .apoya-fallback {
    display: none;
  }
  .apoya-mobile-support {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 0.65rem 0.45rem;
  }
  .apoya-block-divider {
    display: none;
  }
  .apoya-privacy {
    display: none;
  }
}

@media (max-width: 480px) {
  .apoya-block {
    padding: 0.78rem;
  }
  .apoya-mobile-support {
    padding: 0.55rem 0.35rem 0.35rem;
  }
}

/* Dual support CTAs */
.apoya-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 0.72rem;
}

.apoya-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.apoya-btn-secondary:hover {
  transform: translateY(-1.5px);
  background: rgba(255,255,255,0.095);
  border-color: rgba(255,255,255,0.24);
}

.apoya-btn-secondary:active {
  transform: translateY(0);
  transition-duration: 60ms;
}

@media (max-width: 520px) {
  .apoya-actions {
    grid-template-columns: 1fr;
  }
}

/* Dual support CTAs */
.apoya-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.apoya-actions .apoya-btn-main {
  margin-bottom: 0;
  min-height: 50px;
}

@media (max-width: 520px) {
  .apoya-actions {
    grid-template-columns: 1fr;
  }
}

/* Equal understated support buttons */
.apoya-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.apoya-actions .apoya-btn-main {
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-bottom: 0;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.86);
  box-shadow: none;
  text-align: center;
}

.apoya-actions .apoya-btn-main:hover {
  background: rgba(255,255,255,0.095);
  border-color: rgba(255,255,255,0.24);
  box-shadow: none;
}

[data-theme="dark"] .apoya-actions .apoya-btn-main {
  background: rgba(255,255,255,0.055);
  color: rgba(255,255,255,0.84);
  box-shadow: none;
}

[data-theme="dark"] .apoya-actions .apoya-btn-main:hover {
  background: rgba(255,255,255,0.095);
  border-color: rgba(255,255,255,0.22);
  box-shadow: none;
}

@media (max-width: 520px) {
  .apoya-actions {
    grid-template-columns: 1fr;
  }
}

/* Final polish for support buttons and closing note */
.apoya-actions .apoya-btn-main {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.075);
  color: rgba(255,255,255,0.92);
}

.apoya-actions .apoya-btn-main:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
}

[data-theme="dark"] .apoya-actions .apoya-btn-main {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}

[data-theme="dark"] .apoya-actions .apoya-btn-main:hover {
  background: rgba(255,255,255,0.115);
  border-color: rgba(255,255,255,0.28);
}

.apoya-final {
  color: hsl(240 5% 50%);
}

[data-theme="dark"] .apoya-final {
  color: rgba(255,255,255,0.58);
}

.apoya-open-note {
  color: var(--fg) !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}

.apoya-alt-support {
  margin: -0.65rem auto 1.9rem;
  max-width: 44ch;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

.apoya-alt-support a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.apoya-compat-main {
  padding-top: 5rem;
}

.apoya-compat-main .apoya-final a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Viewport ownership: keep Ko-fi embed and mobile CTA mutually exclusive. */
@media (min-width: 701px) {
  .apoya-kofi-panel,
  .apoya-fallback,
  .apoya-privacy {
    display: block !important;
  }

  .apoya-mobile-support {
    display: none !important;
  }
}

@media (max-width: 700px) {
  .apoya-kofi-panel,
  .apoya-kofi-frame,
  .apoya-fallback,
  .apoya-privacy,
  .apoya-block-divider {
    display: none !important;
  }

  .apoya-mobile-support {
    display: block !important;
  }
}
