/* ─── Fullscreen Auth / Setup / Paywall Views ─── */

.fullscreen-view {

  display: flex;

  align-items: center;

  justify-content: center;

  min-height: 100dvh;

  padding: 40px 24px;

  background: var(--bg);

}

.auth-panel {

  width: 100%;

  max-width: 480px;

  text-align: center;

}

.auth-brand {

  display: inline-block;

  font-size: 15px;

  font-weight: 700;

  letter-spacing: 0.04em;

  color: var(--text);

  margin-bottom: 32px;

}

.auth-panel h2 {

  font-size: 28px;

  font-weight: 650;

  margin: 0 0 8px;

  letter-spacing: -0.02em;

}

.auth-sub {

  color: var(--text-secondary);

  font-size: 15px;

  margin: 0 0 28px;

  line-height: 1.5;

}

.auth-actions {

  display: flex;

  flex-direction: column;

  gap: 12px;

}

.auth-google {

  width: 100%;

  min-height: 44px;

}

.auth-notice {

  font-size: 13px;

  color: var(--text-secondary);

  margin: 4px 0 0;

  min-height: 20px;

}

.auth-email {

  font-size: 14px;

  color: var(--text-secondary);

  margin: 0 0 20px;

}

.auth-back {

  margin-top: 20px;

  height: 40px;

  padding: 0 20px;

  border-radius: 8px;

  font-size: 14px;

  font-weight: 600;

  color: var(--text);

  background: var(--bg-secondary);

  border: 1px solid var(--border);

  transition: background var(--transition);

}

.auth-back:hover {

  background: var(--bg);

}

.auth-signout {

  margin-top: 12px;

  height: 40px;

  padding: 0 20px;

  border-radius: 8px;

  font-size: 14px;

  font-weight: 600;

  color: var(--text);

  background: var(--bg);

  border: 1px solid var(--border);

  transition: background var(--transition);

}

.auth-signout:hover {

  background: var(--bg-secondary);

}

.service-list {

  text-align: left;

  display: grid;

  gap: 8px;

  margin-top: 8px;

}

.service-row {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 10px 14px;

  border-radius: 8px;

  background: var(--bg-secondary);

  font-size: 14px;

}

.status-ok { color: #16a34a; font-weight: 600; }

.status-missing { color: var(--danger); font-weight: 600; }

/* Paywall: mirrors the home.klui.ai pricing cards. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/source-serif-4-semibold.woff2") format("woff2");
}

#paywallView {
  --pay-ink: #0b1b3a;
  --pay-cream: #fff8e9;
  --pay-sky: #79cfff;
  --pay-yellow: #ffd43b;
  --pay-coral: #ff623f;
  --pay-dots: radial-gradient(circle, rgb(11 27 58 / 0.2) 0 1px, transparent 1.2px);
  --pay-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  align-items: flex-start;
  min-height: 100dvh;
  padding: clamp(36px, 6vw, 72px) 24px 64px;
  background-color: #fff0d1;
  background-image: var(--pay-dots);
  background-size: 6px 6px;
  color: var(--pay-ink);
  color-scheme: light;
}

.paywall-panel {
  position: relative;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.paywall-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--pay-ink);
  background: var(--pay-cream);
  color: var(--pay-ink);
  box-shadow: 4px 4px 0 var(--pay-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.paywall-close:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--pay-ink);
}

.paywall-close:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--pay-ink);
}

.paywall-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-bottom: 28px;
  text-align: center;
}

.paywall-brand {
  font-family: var(--pay-display);
  font-size: clamp(54px, 8vw, 88px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--pay-ink);
}

.paywall-sticker {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid var(--pay-ink);
  background: var(--pay-coral);
  color: var(--pay-ink);
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 900;
  transform: rotate(-1.5deg);
}

#paywallView .auth-email {
  margin: 0 0 22px;
  text-align: center;
  color: rgb(11 27 58 / 0.66);
  font-weight: 650;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 64px;
}

.plan-card {
  position: relative;
  display: flex;
  min-height: 560px;
  flex-direction: column;
  padding: 32px;
  border: 2px solid var(--pay-ink);
  background-color: var(--pay-cream);
  background-image: var(--pay-dots);
  background-size: 6px 6px;
  text-align: left;
}

.plan-card + .plan-card {
  border-left: 0;
}

.plan-card-pro {
  z-index: 1;
  margin: -22px 0 22px;
  background-color: var(--pay-sky);
  box-shadow: 7px 7px 0 var(--pay-ink);
}

.plan-card-max {
  background-color: var(--pay-yellow);
}

.plan-tag {
  position: absolute;
  top: -18px;
  right: 18px;
  margin: 0;
  padding: 6px 10px;
  border: 2px solid var(--pay-ink);
  background: var(--pay-coral);
  font-size: 13px;
  font-weight: 900;
  transform: rotate(2deg);
}

.plan-card .plan-name {
  margin: 0;
  font-family: var(--pay-display);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.plan-price {
  margin: 26px 0 18px;
  font-weight: 850;
}

.plan-price strong {
  font-family: var(--pay-display);
  font-size: 4.5rem;
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.plan-price span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.plan-price small,
.plan-offer {
  font-size: 12px;
  font-weight: 650;
  opacity: 0.72;
}

.plan-price small {
  margin-left: 6px;
}

.plan-offer {
  margin: -8px 0 18px;
}

.plan-copy {
  min-height: 54px;
  margin: 0;
  font-weight: 650;
}

.plan-card ul {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 24px 0 28px 20px;
  border-top: 2px solid var(--pay-ink);
  font-size: 16px;
}

.plan-qr {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 14px auto 10px;
  border: 2px solid var(--pay-ink);
  background: white;
}

.plan-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  padding: 0 24px;
  border: 2px solid var(--pay-ink);
  border-radius: 0;
  background: var(--pay-coral);
  color: var(--pay-ink);
  box-shadow: 5px 5px 0 var(--pay-ink);
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 120ms ease;
}

.plan-pay-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--pay-ink);
}

.plan-pay-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--pay-ink);
}

.plan-pay-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.plan-payment-note {
  margin: 16px 0 0;
  color: rgb(11 27 58 / 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.paywall-panel > .plan-payment-note {
  margin-top: 40px;
  font-size: 13px;
}

.paywall-coupon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto 4px;
}

.coupon-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 2px dashed var(--pay-ink);
  background: color-mix(in srgb, var(--pay-cream) 82%, transparent);
  color: var(--pay-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease;
}

.coupon-toggle:hover {
  background: var(--pay-yellow);
  transform: translateY(-1px);
}

.coupon-toggle:focus-visible,
.coupon-form input:focus-visible,
.coupon-form button:focus-visible,
.coupon-applied button:focus-visible {
  outline: 3px solid var(--pay-coral);
  outline-offset: 2px;
}

.coupon-form {
  display: flex;
  width: 100%;
  max-width: 360px;
  animation: coupon-in 180ms ease-out;
}

.coupon-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--pay-ink);
  border-right: 0;
  border-radius: 0;
  background: var(--pay-cream);
  color: var(--pay-ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coupon-form input::placeholder {
  color: color-mix(in srgb, var(--pay-ink) 45%, transparent);
  letter-spacing: 0.02em;
  text-transform: none;
}

.coupon-form button {
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--pay-ink);
  border-radius: 0;
  background: var(--pay-ink);
  color: var(--pay-cream);
  font-weight: 850;
  cursor: pointer;
}

.coupon-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.coupon-applied {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 6px 0 12px;
  border: 2px solid var(--pay-ink);
  background: var(--pay-yellow);
  box-shadow: 4px 4px 0 var(--pay-ink);
  color: var(--pay-ink);
  font-size: 14px;
  font-weight: 700;
  animation: coupon-in 200ms ease-out;
}

.coupon-applied strong {
  font-weight: 900;
  letter-spacing: 0.06em;
}

.coupon-applied button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--pay-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.coupon-toggle.hidden,
.coupon-form.hidden,
.coupon-applied.hidden {
  display: none;
}

.paywall-coupon-status {
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #b4290b;
}

.paywall-coupon-status:empty {
  display: none;
}

@keyframes coupon-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .coupon-form,
  .coupon-applied {
    animation: none;
  }
}

.paywall-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 980px) {
  .plan-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 620px;
    margin-inline: auto;
  }

  .plan-card + .plan-card {
    border-left: 2px solid var(--pay-ink);
  }

  .plan-card-pro {
    margin: 0;
  }

  .plan-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  #paywallView {
    padding: 28px 16px 40px;
  }

  .plan-card {
    padding: 26px 22px;
  }

  .plan-price strong {
    font-size: 3.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-pay-btn,
  .paywall-close {
    transition: none;
  }

  .plan-pay-btn:hover,
  .plan-pay-btn:active {
    transform: none;
  }
}

.payment-pending {

  display: grid;

  gap: 3px;

  margin-top: 12px;

  padding: 10px 12px;

  border: 2px dashed rgba(174, 47, 52, 0.45);

  border-radius: 10px;

  background: rgba(255, 218, 216, 0.55);

  color: #8c1520;

  font-size: 12px;

}

.payment-pending strong {

  color: #6d0010;

  font-size: 13px;

  letter-spacing: 0.02em;

}
