/* AI Personal Assistants app — hero background fit + premium cards ui v20260526c */
body.page-app-ai-personal-assistants .app-stage-section,
.page-app-ai-personal-assistants .app-stage-section {
  padding-top: clamp(18px, 2.2vw, 30px);
}

body.page-app-ai-personal-assistants .app-stage-container,
.page-app-ai-personal-assistants .app-stage-container {
  width: min(1560px, calc(100% - 36px));
  max-width: none;
}

body.page-app-ai-personal-assistants .app-stage-panel,
.page-app-ai-personal-assistants .app-stage-panel,
body.page-app-ai-personal-assistants .content-panel.app-stage-panel,
.page-app-ai-personal-assistants .content-panel.app-stage-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.aipa-app,
.aipa-app * {
  box-sizing: border-box;
}

.aipa-app {
  --aipa-ink: #071b46;
  --aipa-title: #11183a;
  --aipa-muted: #61698a;
  --aipa-blue: #4f46e5;
  --aipa-cyan: #06b6d4;
  --aipa-pink: #ec4899;
  --aipa-border-soft: rgba(173, 161, 255, .42);
  --aipa-border-strong: rgba(145, 198, 255, .58);
  width: 100%;
  max-width: none;
  min-width: 0;
  color: var(--aipa-ink);
}

.aipa-shell {
  width: 100%;
  max-width: none;
  min-width: 0;
  position: relative;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.aipa-top {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: clamp(420px, 33.3vw, 560px);
  margin: 0 0 clamp(22px, 2.4vw, 30px);
  padding: clamp(40px, 4.7vw, 72px) clamp(40px, 4.8vw, 76px);
  overflow: hidden;
  border-radius: clamp(24px, 2.1vw, 34px);
  border: 1px solid rgba(159, 190, 255, .9);
  background-color: #e9e7f2;
  background-image: url('./hero-bg.png');
  background-position: center center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 22px 70px rgba(79, 70, 229, .11), inset 0 1px 0 rgba(255,255,255,.72);
}

.aipa-top::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.03) 45%, rgba(255,255,255,0) 70%);
}

.aipa-copy {
  position: relative;
  z-index: 1;
  width: min(48%, 760px);
  min-width: 0;
}

.aipa-copy h2 {
  margin: 0 0 clamp(14px, 1.3vw, 22px);
  max-width: 780px;
  padding-bottom: .08em;
  overflow: visible;
  font-family: Georgia, 'Times New Roman', ui-serif, serif;
  font-size: clamp(58px, 6.7vw, 112px);
  line-height: .93;
  letter-spacing: -.045em;
  font-weight: 900;
  text-wrap: balance;
}

.aipa-copy h2 span,
.aipa-copy h2 em,
.aipa-copy h2 strong {
  display: block;
}

.aipa-copy h2 span {
  color: #06275c;
}

.aipa-copy h2 em {
  font-style: normal;
  background: linear-gradient(90deg, #119fe6 0%, #23d2df 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aipa-copy h2 strong {
  color: transparent;
  background: linear-gradient(90deg, #4968f4 0%, #7c4df1 36%, #d946ef 66%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.aipa-copy p {
  margin: 0;
  max-width: 620px;
  color: #5a6176;
  font-size: clamp(18px, 1.45vw, 26px);
  line-height: 1.42;
  font-weight: 650;
}

.aipa-badge { display: none !important; }

.aipa-upgrade-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 13px;
  padding: 9px 15px;
  border-radius: 999px;
  color: #4f46e5;
  background: rgba(238, 242, 255, .88);
  border: 1px solid rgba(99, 102, 241, .16);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}

.aipa-limit-strip,
.aipa-upgrade,
.aipa-form,
.aipa-result,
.aipa-loading,
.aipa-error {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.aipa-limit-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 28px;
  border: 1px solid rgba(164, 175, 255, .58);
  background: linear-gradient(90deg, rgba(255,244,249,.82) 0%, rgba(245,241,255,.82) 50%, rgba(238,248,255,.82) 100%);
  box-shadow: 0 16px 42px rgba(31, 41, 55, .06), inset 0 1px 0 rgba(255,255,255,.85);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.aipa-limit-strip::before,
.aipa-assistant-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(247,177,225,.95), rgba(205,175,255,.75), rgba(168,223,255,.95));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.aipa-limit-icon {
  width: 100px;
  height: 100px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(251,239,255,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 12px 32px rgba(236,72,153,.11);
}

.aipa-limit-icon img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.aipa-limit-copy strong,
.aipa-limit-copy span {
  display: block;
}

.aipa-limit-copy strong {
  color: #10163c;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  font-weight: 950;
}

.aipa-limit-copy span {
  color: var(--aipa-muted);
  margin-top: 6px;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.4;
}

.aipa-limit-strip a,
.aipa-upgrade a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0c144a 0%, #040b2f 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(16px, 1.15vw, 18px);
  box-shadow: 0 16px 34px rgba(17,24,39,.18), 0 0 0 2px rgba(75,116,255,.24) inset;
  white-space: nowrap;
}

.aipa-limit-strip a img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.aipa-form {
  display: grid;
  gap: 20px;
}

.aipa-assistant-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.aipa-assistant-chip {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  text-align: left;
  min-width: 0;
  min-height: 182px;
  padding: 18px 20px;
  border-radius: 28px;
  border: 1px solid rgba(164, 175, 255, .38);
  background: linear-gradient(90deg, rgba(255,244,249,.82) 0%, rgba(245,241,255,.82) 50%, rgba(238,248,255,.82) 100%);
  color: var(--aipa-ink);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(31,41,55,.06), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.aipa-assistant-chip:hover,
.aipa-assistant-chip.is-active {
  transform: translateY(-2px);
  border-color: rgba(106, 116, 255, .56);
  box-shadow: 0 22px 48px rgba(120,99,255,.12), inset 0 1px 0 rgba(255,255,255,.95);
}

.aipa-assistant-visual {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.aipa-assistant-visual img {
  width: min(100%, 150px);
  max-height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(122,103,255,.12));
}

.aipa-assistant-copy { display: block; min-width: 0; }
.aipa-assistant-copy strong,
.aipa-assistant-copy span { display: block; }

.aipa-assistant-copy strong {
  margin-bottom: 8px;
  color: var(--aipa-title);
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.2;
  font-weight: 950;
}

.aipa-assistant-copy span {
  color: var(--aipa-muted);
  font-size: clamp(15px, 1.02vw, 17px);
  line-height: 1.45;
}

.aipa-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.aipa-controls-two {
  grid-template-columns: minmax(210px, .55fr) minmax(0, 1.45fr);
}

.aipa-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.aipa-field > span:first-child {
  color: #27324a;
  font-size: 14px;
  font-weight: 900;
}

.aipa-select-wrap,
.aipa-field input,
.aipa-main-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(99,102,241,.20);
  background: rgba(255,255,255,.88);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(31,41,55,.055), inset 0 1px 0 rgba(255,255,255,.94);
}

.aipa-select-wrap {
  position: relative;
  overflow: hidden;
}

.aipa-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #4b5563;
  border-bottom: 2px solid #4b5563;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.aipa-select-wrap select,
.aipa-field input,
.aipa-main-field textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #111827;
  font: inherit;
  background: transparent;
}

.aipa-select-wrap select {
  min-height: 54px;
  padding: 0 42px 0 15px;
  appearance: none;
  font-weight: 800;
}

.aipa-field input {
  min-height: 54px;
  padding: 0 16px;
}

.aipa-main-field textarea {
  min-height: 180px;
  resize: vertical;
  padding: 18px;
  line-height: 1.6;
}

.aipa-select-wrap:focus-within,
.aipa-field input:focus,
.aipa-main-field textarea:focus {
  border-color: rgba(79,70,229,.48);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12), 0 16px 34px rgba(31,41,55,.075);
}

.aipa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.aipa-primary,
.aipa-secondary,
.aipa-result-actions button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 22px;
}

.aipa-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--aipa-blue), var(--aipa-pink));
  box-shadow: 0 18px 38px rgba(79,70,229,.22);
}

.aipa-primary:disabled {
  opacity: .68;
  cursor: wait;
}

.aipa-secondary,
.aipa-result-actions button {
  color: #111827;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(99,102,241,.18);
}

.aipa-mini-note {
  color: var(--aipa-muted);
  font-size: 13px;
  font-weight: 700;
}

.aipa-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(99,102,241,.14);
}
.aipa-loading[hidden] { display: none; }
.aipa-loading strong,
.aipa-loading span { display: block; }
.aipa-loading span { color: var(--aipa-muted); font-size: 14px; margin-top: 3px; }

.aipa-loader {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid rgba(99,102,241,.16);
  border-top-color: var(--aipa-blue);
  animation: aipa-spin .85s linear infinite;
}
@keyframes aipa-spin { to { transform: rotate(360deg); } }

.aipa-upgrade {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  margin-bottom: 0;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(99,102,241,.18);
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,247,237,.88));
  box-shadow: 0 16px 40px rgba(31,41,55,.06);
}
.aipa-upgrade[hidden] { display: none; }
.aipa-upgrade h3,
.aipa-result h3 {
  margin: 0 0 8px;
  color: #132243;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.03em;
}
.aipa-upgrade p,
.aipa-result p {
  margin: 0;
  color: var(--aipa-muted);
  line-height: 1.6;
}

.aipa-result {
  margin-top: 24px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 26px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(99,102,241,.16);
  box-shadow: 0 20px 48px rgba(31,41,55,.075);
}
.aipa-result[hidden] { display: none; }

.aipa-result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.aipa-result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.aipa-result-actions button {
  min-height: 42px;
  padding: 0 15px;
}

.aipa-output {
  min-height: 180px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(99,102,241,.14);
  background: #fff;
  outline: none;
  color: #172033;
  line-height: 1.7;
  min-width: 0;
  overflow-wrap: anywhere;
}
.aipa-output:focus { box-shadow: 0 0 0 4px rgba(99,102,241,.11); }
.aipa-output p,
.aipa-output ul { margin: 0 0 1em; }
.aipa-output p:last-child,
.aipa-output ul:last-child { margin-bottom: 0; }
.aipa-output h4 { margin: 1.1em 0 .45em; font-size: 20px; }
.aipa-output li { margin-bottom: .35em; }

.aipa-error {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff1f2;
  border: 1px solid rgba(244,63,94,.25);
  color: #9f1239;
  font-weight: 800;
}
.aipa-error[hidden] { display: none; }

@media (max-width: 1280px) {
  .aipa-assistant-chip {
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 168px;
    padding: 16px 18px;
  }
  .aipa-assistant-visual img {
    width: min(100%, 128px);
    max-height: 98px;
  }
}

@media (max-width: 1180px) {
  body.page-app-ai-personal-assistants .app-stage-container,
  .page-app-ai-personal-assistants .app-stage-container {
    width: min(100%, calc(100% - 28px));
  }

  .aipa-top {
    min-height: clamp(360px, 39vw, 470px);
    padding: clamp(32px, 4.6vw, 60px);
  }

  .aipa-copy { width: min(55%, 650px); }
  .aipa-copy h2 { font-size: clamp(50px, 7.4vw, 86px); }
  .aipa-assistant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .aipa-top {
    min-height: 430px;
    align-items: flex-start;
    background-size: cover;
    background-position: 62% center;
  }
  .aipa-top::before {
    background: linear-gradient(180deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,.16) 44%, rgba(255,255,255,0) 72%);
  }
  .aipa-copy { width: min(72%, 640px); }
  .aipa-copy h2 { font-size: clamp(46px, 10vw, 78px); }
  .aipa-copy p { max-width: 470px; font-size: clamp(16px, 2.2vw, 20px); }
  .aipa-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aipa-limit-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .aipa-limit-strip a {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  body.page-app-ai-personal-assistants .section-page-body,
  .page-app-ai-personal-assistants .section-page-body {
    padding-top: 14px;
  }

  body.page-app-ai-personal-assistants .app-stage-container,
  .page-app-ai-personal-assistants .app-stage-container {
    width: calc(100% - 16px) !important;
    margin-inline: auto;
  }

  body.page-app-ai-personal-assistants .app-stage-panel,
  .page-app-ai-personal-assistants .app-stage-panel,
  body.page-app-ai-personal-assistants .content-panel.app-stage-panel,
  .page-app-ai-personal-assistants .content-panel.app-stage-panel {
    padding: 0 !important;
    overflow: visible !important;
  }

  .aipa-shell { padding: 0; }

  .aipa-top {
    aspect-ratio: 941 / 1672;
    min-height: auto;
    height: auto;
    padding: clamp(28px, 8vw, 44px) clamp(22px, 7vw, 40px);
    align-items: flex-start;
    border-radius: 24px;
    background-image: url('./hero-bg-mobile.png');
    background-position: center center;
    background-size: cover;
    margin-bottom: 16px;
  }

  .aipa-top::before {
    background: linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.06) 48%, rgba(255,255,255,0) 80%);
  }

  .aipa-copy {
    width: 100%;
    max-width: 100%;
  }

  .aipa-copy h2 {
    max-width: 94%;
    margin-bottom: clamp(14px, 3.8vw, 22px);
    padding-bottom: .08em;
    font-size: clamp(50px, 17.2vw, 86px);
    line-height: .94;
    letter-spacing: -.05em;
  }

  .aipa-copy p {
    max-width: 86%;
    color: #102859;
    font-size: clamp(17px, 4.9vw, 26px);
    line-height: 1.45;
    font-weight: 650;
  }

  .aipa-limit-strip,
  .aipa-upgrade,
  .aipa-result-head {
    flex-direction: column;
    align-items: stretch;
  }

  .aipa-limit-strip {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 18px 16px;
    border-radius: 22px;
  }

  .aipa-limit-copy strong { font-size: 20px; }
  .aipa-limit-copy span { font-size: 15px; }
  .aipa-limit-icon {
    width: 82px;
    height: 82px;
  }
  .aipa-limit-icon img {
    width: 44px;
    height: 44px;
  }

  .aipa-limit-strip a,
  .aipa-upgrade a {
    width: 100%;
    min-height: 56px;
    padding-inline: 18px;
  }

  .aipa-assistant-grid,
  .aipa-controls,
  .aipa-controls-two {
    grid-template-columns: 1fr;
  }

  .aipa-assistant-grid,
  .aipa-controls,
  .aipa-form { gap: 12px; }

  .aipa-assistant-chip {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 132px;
    border-radius: 22px;
    padding: 14px;
    gap: 12px;
  }

  .aipa-assistant-visual img {
    width: min(100%, 92px);
    max-height: 74px;
  }

  .aipa-assistant-copy strong {
    font-size: 19px;
  }

  .aipa-assistant-copy span {
    font-size: 14px;
  }

  .aipa-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .aipa-primary,
  .aipa-secondary,
  .aipa-result-actions button {
    width: 100%;
  }

  .aipa-main-field textarea { min-height: 170px; }
  .aipa-mini-note { text-align: center; }
}

@media (max-width: 390px) {
  body.page-app-ai-personal-assistants .app-stage-container,
  .page-app-ai-personal-assistants .app-stage-container {
    width: calc(100% - 12px) !important;
  }

  .aipa-top {
    border-radius: 20px;
    padding: 24px 18px;
  }

  .aipa-copy h2 {
    font-size: clamp(44px, 16vw, 62px);
  }

  .aipa-copy p {
    max-width: 88%;
    font-size: 16px;
  }

  .aipa-assistant-chip {
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 124px;
  }
}


/* Form controls redesign — v20260526 form UI */
.aipa-field {
  gap: 10px;
}

.aipa-field > span:first-child {
  color: #12256a;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 950;
  line-height: 1.15;
}

.aipa-select-wrap,
.aipa-input-wrap,
.aipa-textarea-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(211, 208, 255, .72);
  background: linear-gradient(90deg, rgba(255,248,252,.88) 0%, rgba(247,244,255,.88) 48%, rgba(239,248,255,.88) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 10px 26px rgba(140, 131, 235, .07);
}

.aipa-input-wrap::before,
.aipa-textarea-wrap::before,
.aipa-select-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(247,177,225,.92), rgba(205,175,255,.65), rgba(168,223,255,.92));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.aipa-field-icon {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 16px;
  padding-right: 12px;
  position: relative;
  z-index: 1;
}

.aipa-field-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(144, 122, 255, .16));
}

.aipa-select-wrap::after {
  right: 24px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 3px solid #21307d;
  border-bottom: 3px solid #21307d;
  transform: translateY(-62%) rotate(45deg);
}

.aipa-select-wrap select,
.aipa-input-wrap input {
  min-height: 92px;
  padding: 0 58px 0 0;
  font-size: clamp(18px, 1.2vw, 20px);
  font-weight: 850;
  color: #16256b;
}

.aipa-input-wrap input::placeholder,
.aipa-textarea-wrap textarea::placeholder {
  color: #9b96be;
  opacity: 1;
  font-weight: 500;
}

.aipa-controls {
  gap: 18px;
}

.aipa-controls-two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
}

.aipa-main-field {
  gap: 12px;
}

.aipa-textarea-wrap {
  align-items: flex-start;
  min-height: 148px;
}

.aipa-field-icon-top {
  align-self: flex-start;
  padding-top: 16px;
}

.aipa-textarea-wrap textarea {
  min-height: 148px;
  padding: 26px 22px 22px 0;
  font-size: clamp(17px, 1.08vw, 18px);
  line-height: 1.55;
  color: #17235e;
}

.aipa-actions {
  align-items: center;
  gap: 14px 18px;
  margin-top: 6px;
}

.aipa-primary,
.aipa-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 86px;
  padding: 0 32px;
  border-radius: 999px;
  font-size: clamp(20px, 1.36vw, 22px);
  line-height: 1;
}

.aipa-btn-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aipa-btn-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.aipa-primary {
  min-width: 448px;
  padding-inline: 26px 34px;
  background: linear-gradient(90deg, #6f3ff5 0%, #ef4ab0 60%, #ff668e 100%);
  box-shadow: 0 20px 36px rgba(236, 72, 153, .22), inset 0 0 0 3px rgba(255,255,255,.18);
}

.aipa-secondary {
  min-width: 196px;
  color: #1b2d7f;
  background: linear-gradient(90deg, rgba(255,248,252,.92) 0%, rgba(245,241,255,.92) 50%, rgba(238,248,255,.92) 100%);
  border: 1px solid rgba(211, 208, 255, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 10px 26px rgba(140, 131, 235, .07);
}

.aipa-secondary .aipa-btn-icon img {
  width: 30px;
  height: 30px;
}

.aipa-mini-note {
  flex: 1 1 320px;
  color: #7f7aa8;
  font-size: clamp(15px, 1vw, 17px);
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
}

@media (max-width: 1180px) {
  .aipa-select-wrap select,
  .aipa-input-wrap input {
    min-height: 82px;
    font-size: 17px;
  }

  .aipa-field-icon {
    width: 70px;
    height: 70px;
  }

  .aipa-field-icon img {
    width: 38px;
    height: 38px;
  }

  .aipa-textarea-wrap {
    min-height: 138px;
  }

  .aipa-textarea-wrap textarea {
    min-height: 138px;
  }

  .aipa-primary,
  .aipa-secondary {
    min-height: 74px;
    font-size: 19px;
  }

  .aipa-primary {
    min-width: 360px;
  }
}

@media (max-width: 980px) {
  .aipa-controls,
  .aipa-controls-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aipa-controls-two .aipa-field:last-child {
    grid-column: 1 / -1;
  }

  .aipa-select-wrap select,
  .aipa-input-wrap input {
    min-height: 76px;
  }

  .aipa-primary,
  .aipa-secondary {
    min-height: 70px;
  }
}

@media (max-width: 640px) {
  .aipa-controls,
  .aipa-controls-two {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .aipa-field > span:first-child {
    font-size: 15px;
  }

  .aipa-select-wrap,
  .aipa-input-wrap,
  .aipa-textarea-wrap {
    border-radius: 20px;
  }

  .aipa-field-icon {
    width: 60px;
    height: 60px;
    padding-left: 14px;
    padding-right: 10px;
  }

  .aipa-field-icon img {
    width: 32px;
    height: 32px;
  }

  .aipa-select-wrap select,
  .aipa-input-wrap input {
    min-height: 66px;
    padding-right: 46px;
    font-size: 16px;
  }

  .aipa-select-wrap::after {
    right: 18px;
    width: 9px;
    height: 9px;
    border-right-width: 2px;
    border-bottom-width: 2px;
  }

  .aipa-textarea-wrap {
    min-height: 132px;
  }

  .aipa-field-icon-top {
    padding-top: 12px;
  }

  .aipa-textarea-wrap textarea {
    min-height: 132px;
    padding: 18px 16px 18px 0;
    font-size: 15px;
  }

  .aipa-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .aipa-primary,
  .aipa-secondary {
    width: 100%;
    min-width: 0;
    min-height: 64px;
    font-size: 18px;
    padding-inline: 18px;
  }

  .aipa-btn-icon,
  .aipa-btn-icon img {
    width: 28px;
    height: 28px;
  }

  .aipa-mini-note {
    text-align: center;
    font-size: 14px;
  }
}


/* Desktop scale-down + unified typing state fix v20260526b */
body.page-app-ai-personal-assistants .app-stage-container,
.page-app-ai-personal-assistants .app-stage-container {
  width: min(1320px, calc(100% - 36px));
}

.aipa-form {
  gap: 18px;
}

.aipa-controls {
  gap: 16px;
}

.aipa-field > span:first-child {
  font-size: 14px;
}

.aipa-select-wrap,
.aipa-input-wrap,
.aipa-textarea-wrap {
  border-radius: 22px;
}

.aipa-field-icon {
  width: 64px;
  height: 64px;
  padding-left: 14px;
  padding-right: 10px;
  transition: width .18s ease, padding .18s ease, opacity .16s ease, transform .18s ease;
}

.aipa-field-icon img {
  width: 34px;
  height: 34px;
}

.aipa-select-wrap select,
.aipa-input-wrap input {
  min-height: 74px;
  padding-right: 48px;
  font-size: 16px;
}

.aipa-textarea-wrap {
  min-height: 134px;
}

.aipa-textarea-wrap textarea {
  min-height: 134px;
  padding: 20px 18px 18px 0;
  font-size: 16px;
}

.aipa-input-wrap input,
.aipa-textarea-wrap textarea {
  transition: padding .18s ease;
}

.aipa-input-wrap input::placeholder,
.aipa-textarea-wrap textarea::placeholder {
  transition: opacity .12s ease;
}

.aipa-input-wrap:focus-within .aipa-field-icon,
.aipa-textarea-wrap:focus-within .aipa-field-icon {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  transform: translateX(-8px);
}

.aipa-input-wrap:focus-within input {
  padding-left: 18px;
}

.aipa-textarea-wrap:focus-within textarea {
  padding-left: 18px;
}

.aipa-input-wrap input:focus::placeholder,
.aipa-textarea-wrap textarea:focus::placeholder {
  opacity: 0;
}

.aipa-actions {
  gap: 12px 16px;
}

.aipa-primary,
.aipa-secondary {
  min-height: 70px;
  font-size: 17px;
  gap: 10px;
}

.aipa-btn-icon {
  width: 26px;
  height: 26px;
}

.aipa-btn-icon img {
  width: 24px;
  height: 24px;
}

.aipa-primary {
  min-width: 320px;
  padding-inline: 22px 28px;
}

.aipa-secondary {
  min-width: 150px;
}

.aipa-mini-note {
  font-size: 14px;
}

@media (max-width: 1180px) {
  body.page-app-ai-personal-assistants .app-stage-container,
  .page-app-ai-personal-assistants .app-stage-container {
    width: min(100%, calc(100% - 28px));
  }

  .aipa-field-icon {
    width: 60px;
    height: 60px;
  }

  .aipa-field-icon img {
    width: 32px;
    height: 32px;
  }

  .aipa-select-wrap select,
  .aipa-input-wrap input {
    min-height: 68px;
    font-size: 15px;
  }

  .aipa-textarea-wrap,
  .aipa-textarea-wrap textarea {
    min-height: 128px;
  }

  .aipa-primary,
  .aipa-secondary {
    min-height: 64px;
    font-size: 16px;
  }

  .aipa-primary {
    min-width: 280px;
  }
}

@media (max-width: 640px) {
  .aipa-input-wrap:focus-within input,
  .aipa-textarea-wrap:focus-within textarea {
    padding-left: 14px;
  }
}


/* Desktop polish: compact hero, preview strip and assistant cards v20260526c */
@media (min-width: 1181px) {
  .aipa-top {
    min-height: clamp(330px, 25.4vw, 420px);
    padding: clamp(34px, 3.8vw, 58px) clamp(38px, 4.2vw, 64px);
    margin-bottom: 20px;
  }

  .aipa-copy h2 {
    font-size: clamp(52px, 5.35vw, 88px);
    line-height: .92;
    margin-bottom: 12px;
  }

  .aipa-copy p {
    max-width: 560px;
    font-size: clamp(16px, 1.12vw, 20px);
    line-height: 1.38;
  }

  .aipa-limit-strip {
    min-height: 92px;
    padding: 12px 18px;
    gap: 14px;
    border-radius: 24px;
    margin-bottom: 18px;
  }

  .aipa-limit-icon {
    width: 74px;
    height: 74px;
  }

  .aipa-limit-icon img {
    width: 40px;
    height: 40px;
  }

  .aipa-limit-copy strong {
    font-size: 22px;
  }

  .aipa-limit-copy span {
    margin-top: 4px;
    font-size: 15px;
  }

  .aipa-limit-strip a,
  .aipa-upgrade a {
    min-height: 50px;
    padding: 0 20px;
    gap: 9px;
    font-size: 15px;
  }

  .aipa-limit-strip a img {
    width: 22px;
    height: 22px;
  }

  .aipa-assistant-grid {
    gap: 12px;
    margin-bottom: 0;
  }

  .aipa-assistant-chip {
    grid-template-columns: 106px minmax(0, 1fr);
    min-height: 132px;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 22px;
  }

  .aipa-assistant-visual img {
    width: min(100%, 96px);
    max-height: 78px;
  }

  .aipa-assistant-copy strong {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.18;
  }

  .aipa-assistant-copy span {
    font-size: 14px;
    line-height: 1.38;
  }

  .aipa-form {
    gap: 16px;
  }
}

.aipa-primary .aipa-btn-icon img {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 3px 7px rgba(255,255,255,.18));
}


/* Loading popup + result block redesign v20260526d */
.aipa-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: transparent;
  border: 0;
  margin: 0;
}

.aipa-loading-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 70%, rgba(244, 114, 182, .18), transparent 30%),
              radial-gradient(circle at 35% 45%, rgba(99, 102, 241, .18), transparent 28%),
              rgba(239, 240, 248, .64);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.aipa-loading-modal {
  position: relative;
  width: min(100%, 740px);
  padding: 54px 44px 42px;
  text-align: center;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, .78);
  background: linear-gradient(135deg, rgba(248,249,255,.92) 0%, rgba(245,243,255,.92) 42%, rgba(255,244,250,.92) 100%);
  box-shadow: 0 30px 80px rgba(92, 92, 160, .16), inset 0 1px 0 rgba(255,255,255,.98);
  overflow: hidden;
}

.aipa-loading-modal::before,
.aipa-loading-modal::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(20px);
}

.aipa-loading-modal::before {
  width: 220px;
  height: 220px;
  left: -70px;
  bottom: -80px;
  background: radial-gradient(circle, rgba(129, 140, 248, .35), rgba(129,140,248,0));
}

.aipa-loading-modal::after {
  width: 220px;
  height: 220px;
  right: -80px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(244, 114, 182, .28), rgba(244,114,182,0));
}

.aipa-loading-ring {
  --aipa-progress: 0;
  width: clamp(210px, 28vw, 270px);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #6ac8ff 0%, #766ff5 calc(var(--aipa-progress) * .66%), #ef7ad7 calc(var(--aipa-progress) * 1%), rgba(235, 236, 249, .7) 0);
  position: relative;
  display: grid;
  place-items: center;
  transition: background .22s ease;
  box-shadow: 0 14px 36px rgba(124, 109, 248, .12);
}

.aipa-loading-ring::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(250, 251, 255, .98), rgba(249, 245, 255, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}

.aipa-loading-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.38);
}

.aipa-loading-ring-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.aipa-loading-ring-core strong {
  margin: 0;
  font-size: clamp(54px, 6.2vw, 74px);
  line-height: .92;
  font-weight: 950;
  color: #27308b;
  letter-spacing: -.06em;
}

.aipa-loading-ring-core span {
  font-size: clamp(16px, 1.6vw, 20px);
  color: #7f82b7;
  font-weight: 650;
}

.aipa-loading-modal h4 {
  position: relative;
  margin: 0 0 8px;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1.02;
  font-weight: 950;
  color: #13257d;
  letter-spacing: -.045em;
}

.aipa-loading-modal h4 span {
  background: linear-gradient(90deg, #5b6af6 0%, #9c44f0 42%, #e842b1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aipa-loading-modal p {
  margin: 0;
  font-size: clamp(18px, 1.5vw, 28px);
  line-height: 1.4;
  color: #767bb0;
}

.aipa-loading-dots {
  display: inline-flex;
  gap: 10px;
  margin-top: 24px;
}

.aipa-loading-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8bbcff, #e49ce7);
  opacity: .45;
  animation: aipa-dot-bounce 1.2s infinite ease-in-out;
}

.aipa-loading-dots i:nth-child(2) { animation-delay: .16s; }
.aipa-loading-dots i:nth-child(3) { animation-delay: .32s; }

@keyframes aipa-dot-bounce {
  0%, 80%, 100% { transform: translateY(0) scale(.84); opacity: .38; }
  40% { transform: translateY(-4px) scale(1); opacity: 1; }
}

.aipa-result {
  position: relative;
  margin-top: 28px;
  padding: clamp(18px, 2.4vw, 30px);
  border-radius: 32px;
  background: linear-gradient(90deg, rgba(255,247,252,.9) 0%, rgba(245,243,255,.88) 50%, rgba(239,248,255,.9) 100%);
  border: 1px solid rgba(206, 215, 255, .8);
  box-shadow: 0 26px 70px rgba(105, 104, 176, .12), inset 0 1px 0 rgba(255,255,255,.96);
  overflow: hidden;
}

.aipa-result::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(247,177,225,.88), rgba(205,175,255,.64), rgba(168,223,255,.9));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.aipa-result-head {
  position: relative;
  z-index: 1;
  gap: 22px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.aipa-result-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3.3vw, 56px);
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 950;
  background: linear-gradient(90deg, #a844f0 0%, #ff5c93 18%, #5c6af6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aipa-result-copy p {
  color: #7f82aa;
  font-size: clamp(16px, 1.15vw, 22px);
  line-height: 1.42;
}

.aipa-result-actions {
  gap: 14px;
}

.aipa-result-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 78px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: clamp(18px, 1.16vw, 22px);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(118, 111, 245, .14), inset 0 1px 0 rgba(255,255,255,.95);
  transition: transform .18s ease, box-shadow .18s ease;
}

.aipa-result-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(118, 111, 245, .18), inset 0 1px 0 rgba(255,255,255,.95);
}

.aipa-result-button-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aipa-result-button-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.aipa-result-copy-btn {
  color: #8f35dd;
  background: linear-gradient(135deg, rgba(255, 245, 251, .95), rgba(252, 240, 255, .95));
  border: 1px solid rgba(241, 172, 224, .58);
}

.aipa-result-download-btn {
  color: #4350e3;
  background: linear-gradient(135deg, rgba(241, 250, 255, .96), rgba(238, 247, 255, .95));
  border: 1px solid rgba(160, 225, 255, .76);
}

.aipa-output {
  position: relative;
  z-index: 1;
  min-height: 240px;
  padding: 26px 28px;
  border-radius: 28px;
  border: 1px solid rgba(202, 214, 255, .72);
  background: linear-gradient(180deg, rgba(253,253,255,.96), rgba(246,249,255,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 16px 40px rgba(139, 150, 255, .07);
  font-size: 17px;
  line-height: 1.74;
  color: #1d2553;
}

.aipa-output h4 {
  margin: 1.15em 0 .48em;
  color: #21307d;
  font-size: 22px;
  line-height: 1.25;
}

.aipa-output ol,
.aipa-output ul {
  padding-left: 1.2em;
}

@media (max-width: 860px) {
  .aipa-loading-modal {
    width: min(100%, 520px);
    padding: 34px 22px 28px;
    border-radius: 26px;
  }

  .aipa-loading-ring {
    width: min(78vw, 230px);
    margin-bottom: 14px;
  }

  .aipa-loading-ring::before { inset: 14px; }

  .aipa-loading-modal p {
    font-size: 16px;
  }

  .aipa-result-head {
    flex-direction: column;
    align-items: stretch;
  }

  .aipa-result-actions {
    width: 100%;
  }

  .aipa-result-button {
    flex: 1 1 220px;
    min-height: 64px;
    padding: 0 18px;
    font-size: 16px;
  }

  .aipa-result-button-icon,
  .aipa-result-button-icon img {
    width: 28px;
    height: 28px;
  }

  .aipa-output {
    min-height: 180px;
    padding: 20px 18px;
    border-radius: 22px;
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .aipa-loading {
    padding: 16px;
  }

  .aipa-loading-modal h4 {
    font-size: 30px;
  }

  .aipa-loading-ring-core strong {
    font-size: 48px;
  }

  .aipa-loading-ring-core span {
    font-size: 15px;
  }

  .aipa-loading-dots {
    margin-top: 18px;
  }

  .aipa-result {
    border-radius: 24px;
  }

  .aipa-result-copy h3 {
    font-size: 32px;
  }

  .aipa-result-actions {
    flex-direction: column;
  }

  .aipa-result-button {
    width: 100%;
  }
}


/* Ordered-step output fix v20260526e */
.aipa-output .aipa-step-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 .72em;
}

.aipa-output .aipa-step-line > span {
  color: #27308b;
  font-weight: 850;
}

.aipa-output .aipa-step-line + ul {
  margin-top: -.28em;
  margin-bottom: .95em;
}


/* Final select dropdown polish + compact mobile result buttons v20260526f */
.aipa-select-wrap {
  overflow: visible !important;
  z-index: 3;
}

.aipa-select-wrap.is-open {
  z-index: 80;
}

.aipa-native-select {
  position: absolute !important;
  inset: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
}

.aipa-custom-select-trigger {
  flex: 1 1 auto;
  min-width: 0;
  min-height: inherit;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 56px 0 0;
  border: 0;
  background: transparent;
  color: #16256b;
  font: inherit;
  font-size: clamp(16px, 1.06vw, 18px);
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.aipa-custom-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aipa-custom-select-menu {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% + 9px);
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(190, 202, 255, .78);
  background: linear-gradient(135deg, rgba(255, 249, 253, .98), rgba(244, 248, 255, .98));
  box-shadow: 0 22px 48px rgba(76, 72, 140, .16), inset 0 1px 0 rgba(255,255,255,.96);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px) scale(.985);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 90;
}

.aipa-select-wrap.is-open .aipa-custom-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.aipa-custom-select-option {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #1c2768;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}

.aipa-custom-select-option:hover,
.aipa-custom-select-option:focus {
  outline: none;
  background: rgba(107, 112, 246, .10);
  color: #4f46e5;
}

.aipa-custom-select-option.is-selected {
  color: #fff;
  background: linear-gradient(90deg, #5a67f3 0%, #9d4cec 58%, #ef54a9 100%);
  box-shadow: 0 10px 22px rgba(124, 92, 246, .18);
}

.aipa-custom-select-option + .aipa-custom-select-option {
  margin-top: 3px;
}

@media (max-width: 640px) {
  .aipa-custom-select-trigger {
    min-height: 66px;
    padding-right: 44px;
    font-size: 15px;
  }

  .aipa-custom-select-menu {
    left: 10px;
    right: 10px;
    top: calc(100% + 7px);
    max-height: 230px;
    border-radius: 16px;
    padding: 6px;
  }

  .aipa-custom-select-option {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 11px;
  }

  .aipa-result-actions {
    flex-direction: row !important;
    display: flex !important;
    gap: 8px !important;
    width: 100%;
  }

  .aipa-result-button {
    width: auto !important;
    flex: 1 1 0 !important;
    min-height: 48px !important;
    padding: 0 10px !important;
    gap: 6px !important;
    font-size: 13px !important;
    line-height: 1.08 !important;
    border-radius: 999px !important;
  }

  .aipa-result-button-icon,
  .aipa-result-button-icon img {
    width: 20px !important;
    height: 20px !important;
  }

  .aipa-result-download-btn span:last-child {
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .aipa-result-button {
    font-size: 12px !important;
    padding-inline: 8px !important;
  }

  .aipa-result-button-icon,
  .aipa-result-button-icon img {
    width: 18px !important;
    height: 18px !important;
  }
}


/* Upgrade + error redesign v20260526e */
.aipa-upgrade {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 26px;
  margin-top: 24px;
  margin-bottom: 0;
  padding: clamp(28px, 3.2vw, 40px);
  border-radius: 34px;
  border: 1px solid rgba(201, 223, 255, .82);
  background:
    radial-gradient(circle at 0% 100%, rgba(251, 113, 133, .11), transparent 26%),
    radial-gradient(circle at 70% 100%, rgba(196, 181, 253, .22), transparent 28%),
    linear-gradient(90deg, rgba(255,247,252,.92) 0%, rgba(246,244,255,.9) 44%, rgba(238,248,255,.92) 100%);
  box-shadow: 0 24px 60px rgba(106, 110, 173, .12), inset 0 1px 0 rgba(255,255,255,.96);
  overflow: hidden;
}

.aipa-upgrade::before,
.aipa-error::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(247,177,225,.9), rgba(205,175,255,.68), rgba(168,223,255,.92));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.aipa-upgrade::after {
  content: '';
  position: absolute;
  right: -6%;
  top: 12%;
  width: 52%;
  height: 76%;
  background:
    linear-gradient(140deg, rgba(255,255,255,.02) 28%, rgba(255,255,255,.22) 30%, rgba(255,255,255,.02) 32%),
    linear-gradient(152deg, transparent 46%, rgba(255,255,255,.18) 49%, transparent 52%),
    linear-gradient(160deg, transparent 60%, rgba(255,255,255,.12) 63%, transparent 66%);
  opacity: .65;
  pointer-events: none;
}

.aipa-upgrade-copy {
  position: relative;
  z-index: 1;
  max-width: 740px;
}

.aipa-upgrade-kicker {
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px 24px;
  color: #9050d8;
  background: rgba(244, 234, 249, .9);
  border: 1px solid rgba(215, 185, 241, .66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
  font-size: 18px;
  font-weight: 850;
}

.aipa-upgrade-kicker::before {
  content: '✦';
  font-size: 18px;
  line-height: 1;
}

.aipa-upgrade h3 {
  margin: 0 0 18px;
  font-size: clamp(48px, 5.4vw, 82px);
  line-height: .95;
  letter-spacing: -.055em;
  color: #192677;
  font-weight: 950;
}

.aipa-upgrade h3 span,
.aipa-upgrade h3 em {
  display: block;
  font-style: normal;
}

.aipa-upgrade h3 em {
  background: linear-gradient(90deg, #ff4f9a 0%, #d656da 33%, #8d69f3 66%, #43b3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aipa-upgrade p {
  max-width: 760px;
  color: #69709d;
  font-size: clamp(18px, 1.45vw, 26px);
  line-height: 1.45;
}

.aipa-upgrade a,
.aipa-upgrade-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 102px;
  min-width: min(100%, 620px);
  padding: 16px 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, #211777 0%, #091b77 50%, #013067 100%);
  color: #fff;
  text-decoration: none;
  font-size: clamp(22px, 1.75vw, 34px);
  font-weight: 900;
  box-shadow: 0 22px 44px rgba(56, 74, 156, .16), inset 0 0 0 2px rgba(255,255,255,.12), 0 0 0 3px rgba(58, 217, 255, .42);
  white-space: nowrap;
}

.aipa-upgrade-link-icon {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 24px rgba(12,22,74,.18);
  font-size: 34px;
  line-height: 1;
}

.aipa-upgrade-link span:last-child {
  min-width: 0;
}

.aipa-error {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 22px;
  padding: 24px 28px 24px 34px;
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(255,244,247,.95) 0%, rgba(255,247,250,.93) 100%);
  border: 1px solid rgba(249, 168, 212, .6);
  color: #cf3564;
  font-size: clamp(18px, 1.5vw, 28px);
  line-height: 1.35;
  font-weight: 850;
  box-shadow: 0 18px 44px rgba(244, 114, 182, .08), inset 0 1px 0 rgba(255,255,255,.95);
}

.aipa-error::after {
  content: 'i';
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,236,242,.98), rgba(255,228,237,.96));
  color: #f14f81;
  font-size: 38px;
  font-weight: 900;
  font-style: normal;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 10px 24px rgba(244, 114, 182, .08);
  border: 1px solid rgba(248, 167, 191, .48);
}

@media (max-width: 1280px) {
  .aipa-upgrade {
    padding: 24px 24px;
    border-radius: 28px;
    gap: 20px;
  }

  .aipa-upgrade-kicker {
    padding: 11px 18px;
    font-size: 15px;
    margin-bottom: 16px;
  }

  .aipa-upgrade h3 {
    font-size: clamp(38px, 4.1vw, 62px);
    margin-bottom: 14px;
  }

  .aipa-upgrade p {
    font-size: clamp(16px, 1.2vw, 20px);
  }

  .aipa-upgrade a,
  .aipa-upgrade-link {
    min-height: 82px;
    font-size: clamp(18px, 1.3vw, 24px);
    padding: 14px 22px;
  }

  .aipa-upgrade-link-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 28px;
  }

  .aipa-error {
    padding: 20px 22px 20px 24px;
    border-radius: 24px;
    gap: 16px;
    font-size: clamp(16px, 1.2vw, 22px);
  }

  .aipa-error::after {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 31px;
  }
}

@media (max-width: 860px) {
  .aipa-upgrade {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .aipa-upgrade a,
  .aipa-upgrade-link {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .aipa-upgrade {
    padding: 18px 16px;
    border-radius: 22px;
    gap: 16px;
  }

  .aipa-upgrade::after {
    width: 72%;
    height: 42%;
    top: auto;
    bottom: 8%;
    right: -14%;
  }

  .aipa-upgrade-kicker {
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
  }

  .aipa-upgrade h3 {
    font-size: clamp(32px, 10vw, 48px);
    margin-bottom: 12px;
  }

  .aipa-upgrade p {
    font-size: 15px;
  }

  .aipa-upgrade a,
  .aipa-upgrade-link {
    min-height: 64px;
    gap: 12px;
    padding: 12px 16px;
    font-size: 16px;
  }

  .aipa-upgrade-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 22px;
  }

  .aipa-error {
    gap: 12px;
    padding: 14px 14px 14px 16px;
    border-radius: 20px;
    font-size: 15px;
  }

  .aipa-error::after {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 24px;
  }
}


/* Limit popup compact redesign v20260526f */
.aipa-upgrade[hidden] {
  display: none !important;
}

.aipa-upgrade {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 18px !important;
  width: auto !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 78%, rgba(244, 114, 182, .16), transparent 30%),
    radial-gradient(circle at 38% 42%, rgba(99, 102, 241, .16), transparent 28%),
    rgba(239, 240, 248, .66) !important;
  box-shadow: none !important;
  overflow: auto !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.aipa-upgrade::before,
.aipa-upgrade::after {
  display: none !important;
}

.aipa-upgrade-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .95fr);
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  width: min(980px, 100%);
  min-height: 0;
  padding: clamp(24px, 3.1vw, 42px);
  border-radius: 34px;
  border: 1px solid rgba(201, 223, 255, .82);
  background:
    radial-gradient(circle at 0% 100%, rgba(251, 113, 133, .11), transparent 28%),
    radial-gradient(circle at 78% 92%, rgba(59, 130, 246, .18), transparent 30%),
    linear-gradient(90deg, rgba(255,247,252,.94) 0%, rgba(247,245,255,.93) 46%, rgba(239,249,255,.94) 100%);
  box-shadow: 0 28px 78px rgba(88, 88, 148, .17), inset 0 1px 0 rgba(255,255,255,.96);
  overflow: hidden;
}

.aipa-upgrade-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(247,177,225,.9), rgba(205,175,255,.66), rgba(168,223,255,.92));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.aipa-upgrade-panel::after {
  content: '';
  position: absolute;
  right: -10%;
  top: 18%;
  width: 56%;
  height: 68%;
  background:
    linear-gradient(142deg, transparent 22%, rgba(255,255,255,.22) 26%, transparent 31%),
    linear-gradient(158deg, transparent 52%, rgba(255,255,255,.16) 56%, transparent 60%);
  opacity: .72;
  pointer-events: none;
}

.aipa-upgrade-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.aipa-upgrade-kicker {
  gap: 8px !important;
  margin-bottom: clamp(12px, 1.6vw, 18px) !important;
  padding: 10px 16px !important;
  font-size: clamp(13px, 1vw, 16px) !important;
  border-radius: 999px !important;
}

.aipa-upgrade-kicker::before {
  font-size: 15px !important;
}

.aipa-upgrade h3 {
  margin: 0 0 clamp(10px, 1.4vw, 16px) !important;
  font-size: clamp(34px, 4vw, 56px) !important;
  line-height: .98 !important;
  letter-spacing: -.05em !important;
}

.aipa-upgrade p {
  max-width: 520px !important;
  font-size: clamp(15px, 1.25vw, 19px) !important;
  line-height: 1.48 !important;
}

.aipa-upgrade a,
.aipa-upgrade-link {
  justify-self: end;
  min-width: 0 !important;
  width: min(100%, 420px) !important;
  min-height: 74px !important;
  padding: 12px 20px !important;
  gap: 12px !important;
  border-radius: 999px !important;
  font-size: clamp(16px, 1.22vw, 20px) !important;
  white-space: normal !important;
  text-align: left !important;
}

.aipa-upgrade-link-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 16px !important;
  font-size: 24px !important;
}

.aipa-app.is-limit-reached .aipa-error,
.aipa-error:empty {
  display: none !important;
}

@media (max-width: 860px) {
  .aipa-upgrade-panel {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
    padding: 24px 18px;
    border-radius: 26px;
  }

  .aipa-upgrade-copy {
    max-width: none;
  }

  .aipa-upgrade a,
  .aipa-upgrade-link {
    justify-self: stretch;
    width: 100% !important;
    min-height: 62px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 520px) {
  .aipa-upgrade {
    padding: 12px !important;
    align-items: center !important;
  }

  .aipa-upgrade-panel {
    padding: 20px 15px;
    border-radius: 22px;
  }

  .aipa-upgrade h3 {
    font-size: clamp(30px, 9vw, 42px) !important;
  }

  .aipa-upgrade p {
    font-size: 14px !important;
  }

  .aipa-upgrade-link-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 13px !important;
    font-size: 20px !important;
  }
}


/* Close button for limit popup v20260526g */
.aipa-upgrade-close {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(202, 184, 255, .58);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(246,241,255,.86));
  color: #5632b8;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(88, 75, 160, .12), inset 0 1px 0 rgba(255,255,255,.96);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.aipa-upgrade-close:hover {
  transform: translateY(-1px) scale(1.03);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(252,242,255,.94));
  box-shadow: 0 16px 34px rgba(88, 75, 160, .16), inset 0 1px 0 rgba(255,255,255,.98);
}

.aipa-upgrade-close:focus-visible {
  outline: 3px solid rgba(99, 102, 241, .25);
  outline-offset: 3px;
}

.aipa-upgrade-panel {
  padding-right: clamp(52px, 5vw, 72px) !important;
}

@media (max-width: 640px) {
  .aipa-upgrade-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .aipa-upgrade-panel {
    padding-right: 48px !important;
  }
}
