/* Studentix modals — tokens from Figma */
/* Google Fonts: one <link> in main.tpl (home-final-day2) */

:root {
  --primary: #4c7ff5;
  --primary-alt: #4d83fe;
  --primary-text: #3c6ce1;
  --navy: #2a3d60;
  --navy-deep: #172033;
  --muted: #637188;
  --border: #dce5f1;
  --border-soft: #dbe8fb;
  --bg-page: #f7f9fc;
  --bg-soft: #f1f5fa;
  --bg-tint: #edf4ff;
  --bg-plan: #f4f8ff;
  --white: #ffffff;
  --shadow-modal: 0 25px 25px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 5px 13px rgba(25, 33, 61, 0.1);
  --shadow-mini: 0 2px 6px rgba(25, 33, 61, 0.03);
  --radius-modal: 16px;
  --radius-card: 12px;
  --radius-btn: 10px;
  --font: "Inter", system-ui, sans-serif;
  --font-alt: "Montserrat", "Inter", sans-serif;
}

.screen *::before,
.screen *::after {
  box-sizing: border-box;
}

body.is-modal-open {
  overflow: hidden;
  touch-action: none;
}


.screen img {
  display: block;
  max-width: 100%;
}

.screen button,
.screen input,
.screen textarea {
  font: inherit;
}

.screen button:focus,
.screen input:focus,
.screen textarea:focus {
  outline: none;
}

.screen button:focus-visible {
  outline: 2px solid rgba(76, 127, 245, 0.45);
  outline-offset: 2px;
}

.screen button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.screen a {
  color: inherit;
}


.screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

.screen.is-active {
  display: block;
}

.screen.is-closed .stage__overlay {
  pointer-events: none;
}

/* —— Overlay stage —— */
.screen .stage {
  position: absolute;
  inset: 0;
  background: transparent;
  overflow: hidden;
}

.screen .stage__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(23, 32, 51, 0.25);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.screen .stage__overlay.is-visible {
  opacity: 1;
}

/* —— Shared modal —— */
.screen .modal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  background: var(--white);
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-modal);
  overflow: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  z-index: auto;
  transform: translateY(18px) scale(0.96);
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.screen .modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  align-items: stretch;
  height: auto;
}

.screen .modal--info.is-open {
  padding: 25px 23px 24px;
}

.screen .modal--info {
  max-width: 512px;
  padding: 25px 23px 24px;
}

.screen .modal--info .modal__head {
  display: flex;
  gap: 15px;
  align-items: center;
  padding-right: 48px;
}

.screen .modal--info .modal__desc {
  margin-top: 12px;
  min-height: 95px;
}

.screen .modal--info .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.screen .modal--info .actions .btn {
  width: 100%;
}

.screen .modal.is-closing {
  opacity: 0;
  transform: translateY(10px) scale(0.97);
}

.screen .modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  z-index: 2;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.screen .modal__close:hover {
  background: var(--bg-soft);
  transform: rotate(90deg);
}

.screen .modal__close:active {
  transform: rotate(90deg) scale(0.94);
}

.screen .modal__close img {
  width: 20px;
  height: 20px;
}

.screen .modal__icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--bg-tint);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.screen .modal__icon img {
  width: 24px;
  height: 24px;
}

.screen .modal__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--navy);
}

.screen .modal__desc {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  color: var(--navy);
}

.screen .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.02em;
}

.screen .badge--solid {
  background: var(--primary);
  color: #fff;
}

.screen .badge--soft {
  background: var(--bg-soft);
  color: var(--primary-text);
}

.screen .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.screen .btn img {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.screen .btn:hover {
  transform: translateY(-1px);
}

.screen .btn:active {
  transform: translateY(0) scale(0.98);
}

.screen .btn:hover img {
  transform: translateY(-1px);
}

.screen .btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(76, 127, 245, 0.22);
}

.screen .btn--primary:hover {
  background: #3f72ef;
  box-shadow: 0 10px 22px rgba(76, 127, 245, 0.34);
}

.screen .btn--primary:active {
  background: #3566df;
  box-shadow: 0 4px 10px rgba(76, 127, 245, 0.22);
}

.screen .btn--secondary {
  background: var(--white);
  border: 1px solid var(--border-soft);
  color: #1e293b;
  font-weight: 500;
}

.screen .btn--secondary:hover {
  border-color: #c5d7f5;
  background: var(--bg-tint);
  box-shadow: 0 6px 14px rgba(76, 127, 245, 0.1);
}

.screen .btn--ghost {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy-deep);
}

.screen .btn--ghost:hover {
  border-color: #c5d3e8;
  background: #fbfcfe;
  box-shadow: 0 6px 14px rgba(42, 61, 96, 0.08);
}

.screen .checkbox {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

.screen .checkbox__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.screen .checkbox__box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #3c6ce1;
  box-shadow:
    0 0 6.4px rgba(131, 130, 255, 0.2),
    0 0.5px 10.7px rgba(131, 130, 255, 0.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.screen .checkbox__box img {
  width: 10px;
  height: 10px;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.screen .checkbox__input:checked + .checkbox__box {
  background: #4d83fe;
  border-color: #4d83fe;
  box-shadow: 0 4px 10px rgba(77, 131, 254, 0.28);
}

.screen .checkbox__input:checked + .checkbox__box img {
  opacity: 1;
  transform: scale(1);
}

.screen .checkbox__input:focus-visible + .checkbox__box {
  outline: 2px solid rgba(76, 127, 245, 0.45);
  outline-offset: 2px;
}

.screen .checkbox:hover .checkbox__box {
  transform: scale(1.05);
}

.screen .premium-consent.is-attention .premium-consent__item:not(.is-checked) .checkbox__box:hover {
  transform: none;
}

.screen .checkbox__text {
  margin: 0;
  font-family: var(--font-alt);
  font-size: 12px;
  line-height: 16px;
  color: var(--navy);
  transition: color 0.2s ease;
}

.screen .checkbox__text a {
  color: #4d83fe;
  text-decoration: underline;
}

.screen .checkbox__text a:hover {
  color: #2f6af5;
}

.screen .checkbox:hover .checkbox__text {
  color: var(--navy-deep);
}

.screen .plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--white);
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    border-color 0.22s ease,
    background-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.screen .plan-card:hover {
  border-color: #c5d7f5;
  box-shadow: 0 8px 18px rgba(76, 127, 245, 0.1);
  transform: translateY(-2px);
}

.screen .plan-card.is-active {
  border: 1px solid var(--primary);
  background: var(--bg-tint);
  box-shadow: 0 10px 22px rgba(76, 127, 245, 0.16);
}

.screen .plan-card .badge,
.screen .plan-card .badge--solid,
.screen .plan-card .badge--soft {
  margin: 0;
  background: var(--bg-soft);
  color: var(--primary-text);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.screen .plan-card.is-active .badge,
.screen .plan-card.is-active .badge--solid,
.screen .plan-card.is-active .badge--soft {
  background: var(--primary);
  color: #fff;
}

.screen .plan-card__title {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  color: var(--navy);
}

.screen .plan-card__sub {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 14px;
  color: var(--muted);
}

.screen .plan-card.is-active .plan-card__sub {
  color: var(--navy);
}

.screen .plan-card__price {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: var(--navy);
}

.screen .plan-card__sub--custom {
  margin-top: 10px;
  max-width: 172px;
}

.screen .plan-card__counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
}

.screen .plan-card__counter-row .plan-card__price {
  margin: 0;
  text-align: right;
}

.screen .plan-card__row {
  display: block;
}

.screen .plan-card__row .plan-card__title {
  margin-top: 8px;
}

.screen .mobile-only-inline {
  display: none;
}

.screen .desktop-only {
  display: block;
}

.screen .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  white-space: nowrap;
  flex: 0 0 auto;
  box-sizing: border-box;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.screen .chip:hover {
  border-color: #b9ccef;
}

.screen .chip.is-active {
  background: var(--primary-alt);
  border-color: var(--primary-alt);
  color: #fff;
  box-shadow: none;
}

.screen .chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  width: 100%;
  padding-bottom: 2px;
}

.screen .chips::-webkit-scrollbar {
  height: 0;
}

/* —— Premium —— */
.screen .modal--premium {
  max-width: 947px;
  display: grid;
  grid-template-columns: 1fr 318px;
  overflow: hidden;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

.screen .premium-main {
  padding: 25px 24px 24px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.screen .premium-main .modal__head {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 12px;
}

.screen .premium-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.screen .premium-plans .plan-card {
  height: 140px;
  min-height: 140px;
  max-height: 140px;
  padding: 18px 16px;
  border: 2px solid var(--border);
  box-shadow: none;
  transform: none;
  overflow: hidden;
}

.premium-plans .plan-card:hover {
  transform: none;
  box-shadow: none;
  border-color: #c5d7f5;
}

.premium-plans .plan-card.is-active {
  border: 2px solid var(--primary);
  background: var(--bg-tint);
  box-shadow: none;
}

.premium-plans .plan-card__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  margin-top: 10px;
  width: 100%;
}

.premium-plans .plan-card__row .plan-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
}

.premium-plans .plan-card__row .plan-card__sub {
  margin: 0;
}

.premium-plans .plan-card__row .plan-card__price {
  margin: 6px 0 0;
  flex-shrink: 0;
}

.features-block {
  margin-top: 28px;
}

.features-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
  line-height: 20px;
  color: var(--navy-deep);
  overflow: hidden;
}

.features-title__text {
  position: relative;
  z-index: 1;
}

.features-title__shine {
  position: absolute;
  inset: -2px -12px;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(125, 176, 255, 0.22) 48%,
    rgba(184, 230, 214, 0.28) 52%,
    transparent 65%
  );
  transform: translateX(-120%);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
}

.feature-item {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 66px;
  padding: 13px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--white);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition:
    border-color 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.features-block.is-ready .features-title {
  animation: features-title-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.features-block.is-ready .features-title__shine {
  animation: features-shine 1.4s ease 0.35s both;
}

.features-block.is-ready .feature-item {
  animation: feature-item-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.features-block.is-ready .feature-item:nth-child(1) { animation-delay: 0.08s; }
.features-block.is-ready .feature-item:nth-child(2) { animation-delay: 0.16s; }
.features-block.is-ready .feature-item:nth-child(3) { animation-delay: 0.24s; }
.features-block.is-ready .feature-item:nth-child(4) { animation-delay: 0.32s; }
.features-block.is-ready .feature-item:nth-child(5) { animation-delay: 0.4s; }
.features-block.is-ready .feature-item:nth-child(6) { animation-delay: 0.48s; }

.feature-item__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-alt);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #2f5f9e;
  background: linear-gradient(135deg, #e8f2ff 0%, #dff6ef 100%);
  border: 1px solid rgba(110, 168, 230, 0.35);
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  pointer-events: none;
  white-space: nowrap;
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-item__badge::before {
  content: attr(data-label);
}

.feature-item.is-spotlight {
  border-color: #9ec4f5;
  background:
    linear-gradient(135deg, rgba(236, 246, 255, 0.95) 0%, rgba(232, 248, 242, 0.9) 100%);
  box-shadow: 0 8px 18px rgba(76, 127, 245, 0.1);
}

.feature-item.is-spotlight .feature-item__badge {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: feature-badge-soft 2.4s ease-in-out infinite;
}

.feature-item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.35s ease;
}

.feature-item.is-spotlight img {
  transform: scale(1.08);
}

.feature-item p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--navy-deep);
}

@keyframes features-title-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes features-shine {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes feature-item-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes feature-badge-soft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(110, 168, 230, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(110, 168, 230, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .features-title__shine,
  .features-block.is-ready .features-title,
  .features-block.is-ready .feature-item,
  .feature-item.is-spotlight .feature-item__badge {
    animation: none !important;
  }

  .feature-item {
    opacity: 1;
    transform: none;
  }

  .feature-item.is-spotlight .feature-item__badge {
    opacity: 1;
    transform: none;
  }
}

.premium-side {
  background: rgba(237, 244, 255, 0.63);
  border-left: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.premium-side .modal__close {
  top: 16px;
  right: 10px;
}

.premium-side__title {
  margin: 8px 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 25px;
  color: var(--navy);
  max-width: 209px;
}

.premium-side .btn {
  width: 100%;
}

.secure-note {
  margin: 14px 0 0;
  font-family: var(--font-alt);
  font-size: 11px;
  line-height: 15px;
  color: #000;
}

.premium-side__swap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  overflow: hidden;
}

.premium-social[hidden],
.premium-consent[hidden] {
  display: none !important;
}

.premium-social {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.premium-social.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.social-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-shrink: 0;
}

.avatars {
  display: flex;
}

.avatars img {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  margin-left: -8px;
  border: 1px solid #fff;
  object-fit: cover;
}

.avatars img:first-child {
  margin-left: 0;
}

.rating-block p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #151515;
}

.stars-inline {
  display: flex;
  gap: 4px;
}

.stars-inline img {
  width: 15px;
  height: 15px;
}

.screen .reviews {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.screen .review {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.reviews.is-switching .review {
  opacity: 0;
  transform: translateY(6px);
}

.reviews.is-switching .review:nth-child(2) {
  transition-delay: 0.03s;
}

.reviews.is-switching .review:nth-child(3) {
  transition-delay: 0.06s;
}

.review--rtl {
  flex-direction: row-reverse;
}

.review--rtl .review__bubble {
  text-align: right;
}

.review__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #dfe8f7;
  box-shadow: 0 2px 8px rgba(42, 61, 96, 0.12);
}

.review__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.28);
}

.review__bubble {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 10px 13px;
  flex: 0 1 auto;
  max-width: min(219px, calc(100% - 48px));
  min-width: 0;
  box-sizing: border-box;
}

.review__bubble strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
  color: #404040;
}

.review__bubble p {
  margin: 4px 0 0;
  font-size: 9px;
  line-height: 12px;
  color: var(--navy-deep);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.screen .btn-all-reviews {
  margin-top: auto;
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--font-alt);
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  flex-shrink: 0;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn-all-reviews:hover {
  border-color: #c5d7f5;
  background: #f8fbff;
  box-shadow: 0 6px 14px rgba(76, 127, 245, 0.12);
  transform: translateY(-1px);
}

.premium-consent {
  display: none;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 6px 4px 2px;
  box-sizing: border-box;
  opacity: 0;
}

.premium-consent.is-visible {
  display: flex;
  opacity: 1;
  animation: consent-in 0.32s ease both;
}

@keyframes consent-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.premium-consent__warn {
  display: grid;
  place-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #fff;
  font-family: var(--font-alt);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  color: #000;
  box-shadow: 0 1px 0 rgba(42, 61, 96, 0.04);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.premium-consent.is-attention .premium-consent__warn {
  background: #fff1f1;
  color: #b42318;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.22);
  animation: consent-warn-flash 0.55s ease;
}

.premium-consent.is-attention .premium-consent__item:not(.is-checked) .checkbox__box {
  border-color: #e11d48;
  animation: consent-box-pulse 0.65s ease;
}

.premium-consent.is-attention .premium-consent__item:not(.is-checked) .checkbox__text {
  color: #9f1239;
}

@keyframes consent-warn-flash {
  0%,
  100% {
    background: #fff1f1;
  }
  45% {
    background: #ffd6d6;
  }
}

@keyframes consent-box-pulse {
  0%,
  100% {
    background: #fff;
    box-shadow: inset 0 0 0 0 rgba(225, 29, 72, 0);
  }
  35% {
    background: #ffe4e8;
    box-shadow: inset 0 0 0 2px rgba(225, 29, 72, 0.45);
  }
  60% {
    background: #ffd0d8;
    box-shadow: inset 0 0 0 3px rgba(225, 29, 72, 0.28);
  }
}

/* —— Mobile-only full screens —— */
.screen .mobile-frame {
  display: none;
}

/* —— Short / mini laptop viewports —— */
@media (max-height: 860px) {
  .screen .stage__overlay {
    padding: 10px 12px;
    align-items: flex-start;
  }

  .screen .modal {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .premium-plans .plan-card {
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    padding: 14px 14px;
  }

  .premium-plans .plan-card__row {
    margin-top: 6px;
  }

  .premium-plans .plan-card__row .plan-card__title {
    font-size: 16px;
    line-height: 24px;
  }

  .features-block {
    margin-top: 16px;
  }

  .features-title {
    margin-bottom: 10px;
    font-size: 15px;
  }

  .feature-item {
    min-height: 56px;
    padding: 10px;
  }

  .feature-item p {
    font-size: 13px;
    line-height: 18px;
  }

  .modal--tokens .plan-card {
    min-height: 124px;
  }

  .speech-list {
    max-height: none;
  }
}

/* —— Responsive (Figma mobile) —— */
@media (max-width: 860px) {
 

  .screen .stage__overlay {
    padding: 0;
    background: rgba(23, 32, 51, 0.25);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    align-items: stretch;
  }

  .screen .modal,
  .screen .modal.is-open {
    max-width: none !important;
    width: 100%;
    max-height: none;
    min-height: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .screen .modal__close {
    top: 16px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  .screen .modal__title {
    font-size: 20px;
    line-height: 28px;
  }

  #tokens.screen .stage__overlay {
    overflow: hidden;
    padding: 0;
  }

  .modal--tokens,
  .screen .modal--tokens,
  .screen .modal.modal--tokens.is-open {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .modal--tokens .modal__pad {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 16px 12px;
    gap: 10px;
  }

  .modal--tokens .modal__head {
    padding-right: 40px;
  }

  .modal--tokens .modal__desc {
    font-size: 13px;
    line-height: 20px;
  }

  .modal--tokens .plans {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .modal--tokens .plan-card--custom {
    grid-column: 1 / -1;
  }

  .modal--tokens .plan-card {
    min-height: 0;
    padding: 12px 10px;
  }

  .modal--tokens .plan-card:not(.plan-card--custom) {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "badge badge"
      "title price"
      "sub sub";
    column-gap: 8px;
    align-items: center;
  }

  .modal--tokens .plan-card:not(.plan-card--custom) .badge {
    grid-area: badge;
  }

  .modal--tokens .plan-card:not(.plan-card--custom) .plan-card__title {
    grid-area: title;
    margin-top: 6px;
    font-size: 15px;
    line-height: 20px;
  }

  .modal--tokens .plan-card:not(.plan-card--custom) .plan-card__price {
    grid-area: price;
    margin-top: 6px;
    justify-self: end;
  }

  .modal--tokens .plan-card:not(.plan-card--custom) .plan-card__sub {
    grid-area: sub;
    font-size: 11px;
    line-height: 15px;
  }

  .spend-box {
    margin-top: 8px;
    padding: 12px 10px;
  }

  .spend-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
  }

  .modal--tokens .modal__footer {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(237, 244, 255, 0.96);
    border-top: 1px solid var(--border);
    gap: 10px;
  }

  .modal--tokens .modal__footer .btn {
    width: 100%;
  }

  .modal--tokens .modal__close {
    top: 10px;
    right: 10px;
    z-index: 6;
  }

  .modal--email,
  .modal--info,
  .modal--feedback,
  .modal--speech,
  .modal--slide-type,
  .modal--theme {
    padding: 20px 15px;
  }

  .modal--table-ai,
  .modal--chart-ai,
  .modal--slides-ai {
    padding: 0;
  }

  .table-ai-inner,
  .chart-ai-inner {
    padding: 20px 15px 16px;
  }

  .ai-gen-body {
    padding: 20px 15px 16px;
  }

  .slides-ai-type-card {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }

  .slides-ai-type-card__preview {
    justify-self: center;
  }

  .slides-ai-type-card__action {
    justify-content: center;
  }

  .ai-gen-footer {
    padding: 14px 15px 16px;
  }

  .format-grid,
  .slide-grid,
  .theme-grid,
  .platform-row,
  .modal--info .actions,
  .premium-plans,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .screen .slide-preview {
    width: 100%;
  }

  .slide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    margin-top: 12px;
  }

  .slide-card {
    padding: 8px 6px 10px;
    gap: 8px;
    min-width: 0;
  }

  .slide-preview,
  .screen .slide-preview {
    width: 100%;
    max-width: none;
    padding: 4px;
    box-sizing: border-box;
  }

  .slide-preview__inner,
  .screen .slide-preview__inner {
    width: 100% !important;
    max-width: none;
    height: auto;
  }

  .slide-card span {
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
  }

  #slide-type.screen .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #slide-type.screen .chips::-webkit-scrollbar {
    display: none;
  }

  #slide-type.screen .chips .chip {
    flex-shrink: 0;
  }

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

  .theme-card > img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 618 / 348;
    object-fit: cover;
    object-position: center;
    flex-shrink: 1;
  }

  .theme-card p {
    display: none;
  }

  .screen .prem {
    bottom: 8px;
    font-size: 11px;
  }

  #premium.screen .stage__overlay {
    overflow: hidden;
    padding: 0;
  }

  .modal--premium,
  .screen .modal--premium,
  .screen .modal.modal--premium.is-open {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    height: 100%;
    max-height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .premium-main,
  .screen .premium-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 16px 12px;
  }

  .screen .premium-main .modal__head {
    padding-right: 40px;
    margin-bottom: 8px;
  }

  .modal--premium .modal__desc {
    font-size: 13px;
    line-height: 20px;
  }

  .modal--premium .premium-plans,
  .screen .premium-plans {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .premium-plans .plan-card,
  .screen .premium-plans .plan-card {
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 12px 10px;
  }

  .premium-plans .plan-card__row {
    margin-top: 4px;
  }

  .premium-plans .plan-card__row .plan-card__title {
    font-size: 15px;
    line-height: 20px;
  }

  .features-block {
    margin-top: 16px;
  }

  .feature-item {
    min-height: 0;
    padding: 10px 12px;
  }

  .premium-side {
    flex: 0 0 auto;
    position: static;
    overflow: visible;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(237, 244, 255, 0.96);
  }

  .premium-side .modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
  }

  .premium-side__title {
    max-width: none;
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 20px;
  }

  .premium-side__swap {
    flex: none;
    min-height: 0;
    margin-top: 10px;
    overflow: visible;
  }

  .premium-social {
    height: auto;
  }

  .premium-social .reviews,
  .premium-social .btn-all-reviews {
    display: none;
  }

  .social-row {
    gap: 10px;
    align-items: center;
  }

  .premium-consent,
  .premium-consent.is-visible {
    height: auto;
    max-height: min(34vh, 240px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .secure-note {
    margin-top: 8px;
  }

  .modal--speech .modal__footer,
  .modal--feedback .modal__footer {
    flex-direction: column;
  }

  .modal--speech .modal__footer .btn,
  .modal--feedback .modal__footer .btn {
    width: 100%;
  }

  .modal--email .modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .modal--email .modal__footer .btn {
    width: 100%;
  }

  .screen:has(.modal--info) .stage__overlay {
    padding: 16px;
    align-items: center;
    justify-content: center;
  }

  .screen .modal.modal--info,
  .screen .modal.modal--info.is-open {
    max-width: 512px !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-modal, 16px);
    box-shadow: var(--shadow-modal, 0 18px 50px rgba(23, 32, 51, 0.18));
    margin: auto;
  }

  .screen .modal--info .actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .screen .modal--info .actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .screen .chips {
    margin: 0 -15px;
    padding: 0 15px;
  }
}


#premium-pay-btn:after, #premium-pay-btn:before{
  display: none;
}

/* Homepage modal1.css .btn::before/::after cover label text. Editor screens do not use those overlays. */
.screen .btn::before,
.screen .btn::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.screen .btn {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.screen .btn--primary {
  color: #fff;
}

.screen .btn--secondary {
  color: #1e293b;
}

.screen .modal__title {
  display: block;
}

.screen .field-label {
  margin: 12px 0 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.screen .field-input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--primary);
  background: var(--white);
  color: var(--navy);
  font-size: 14px;
  outline: none;
  box-shadow: none;
}

.screen .field-input:hover {
  border-color: #3f72ef;
}

.screen .field-input:focus,
.screen .field-input:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 127, 245, 0.2);
  background: #fbfdff;
}

.screen .field-input::placeholder {
  color: #8a97ad;
}

#askEmail .ask-email-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 7px;
}

#askEmail .ask-email-label-row .field-label {
  margin: 0;
}

#askEmail .ask-email-random {
  border: 0;
  background: #4c7ff5;
  color: #fff;
  font-family: var(--font-alt);
  font-size: 12px;
  padding: 4px 6px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 7px 1px rgba(76, 127, 245, 0.34);
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#askEmail .ask-email-random:hover {
  background: #3f72ef;
  color: #fff;
  box-shadow: 0 5px 11px 1px rgba(76, 127, 245, 0.42);
  transform: translateY(-1px);
}

#askEmail .ask-email-random:focus-visible {
  outline: 2px solid rgba(76, 127, 245, 0.45);
  outline-offset: 3px;
  border-radius: 3px;
}

#askEmail .ask-email-consent {
  align-items: flex-start;
  margin-top: 14px;
}

#askEmail .ask-email-consent .checkbox__box {
  flex: 0 0 18px;
}

#askEmail .modal--info .actions {
  margin-top: 16px;
}

.screen .cred-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.screen .cred-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-plan);
  position: relative;
}

.screen .cred-row img {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.screen .cred-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
}

.screen .cred-row .copy {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin-left: auto;
  opacity: 0.7;
}

.screen .cred-row .copy:hover {
  opacity: 1;
}

.screen .cred-row .data-wrap {
  position: relative;
  min-width: 0;
}

.screen .cred-row .data-wrap span {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  word-break: break-all;
}

.screen .cred-row .copy-notify {
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  top: -2px;
  left: 0;
  z-index: 2;
  background: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2f9e62;
  opacity: 0;
  visibility: hidden;
}

.screen .cred-row .copy-notify.visible {
  opacity: 1;
  visibility: visible;
}
