.ai-short-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 22px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #10203a;
}
.ai-short-dialog::backdrop { background: rgba(8, 18, 40, 0.55); }
.ai-short-dialog h2 { margin: 0 0 8px; font-size: 1.28rem; }
.ai-short-dialog p { margin: 0 0 12px; line-height: 1.45; }
.ai-short-form { display: grid; gap: 12px; }
.ai-short-form label,
.ai-short-check {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}
.ai-short-form input,
.ai-short-form select,
.ai-short-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c5d0e0;
  border-radius: 10px;
  font: inherit;
}
.ai-short-form textarea { min-height: 96px; resize: vertical; }
.ai-char-count {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5b6b82;
  text-align: right;
}
.ai-prompt-submit[disabled] { opacity: 0.65; pointer-events: none; }
.ai-short-check { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.ai-short-check input { width: auto; min-height: 0; }
.ai-short-status[aria-live] { min-height: 1.4em; }
.ai-short-preview {
  width: min(280px, 100%);
  max-height: 480px;
  margin: 0 auto 12px;
  background: #0b1f4d;
  border-radius: 16px;
  display: block;
}
.ai-short-meta { display: grid; gap: 14px; margin-top: 12px; }
.ai-short-meta article {
  padding: 12px;
  border: 1px solid #d7e0ee;
  border-radius: 12px;
  background: #f6f8fc;
}
.ai-short-meta h3 { margin: 0 0 8px; font-size: 1rem; }
.ai-short-copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.ai-short-copy-row p { flex: 1; margin: 0; min-width: 12rem; }
.ai-meta-label {
  display: block;
  width: 100%;
  color: #5b6b82;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ai-short-copy-row button.is-copied { background: #e8f8f0; color: #0f8a56; }
.ai-studio { display: grid; gap: 28px; }
.ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 18px 28px;
  align-items: center;
  padding: 28px 28px 24px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(1200px 280px at 12% -20%, rgba(255,255,255,0.18), transparent 50%),
    linear-gradient(135deg, #0b1f4d 0%, #1565d8 72%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(11, 31, 77, 0.18);
}
.ai-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  right: -140px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(255, 122, 43, 0.22), rgba(255, 122, 43, 0) 70%);
  pointer-events: none;
}
.ai-hero-copy { display: grid; gap: 12px; min-width: 0; }
.ai-hero-ways { margin: 0; font-size: 0.95rem; color: rgba(255,255,255,0.86); }
.ai-hero-visual { display: grid; place-items: center; }
.ai-hero-phone {
  display: grid;
  align-content: start;
  width: 78px;
  height: 138px;
  padding: 10px 8px;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  background: rgba(7, 18, 48, 0.28);
}
.ai-hero-phone-bar {
  display: block;
  width: 28px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
}
.ai-hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.ai-hero h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.03em; }
.ai-hero-lead { margin: 0; max-width: 42rem; font-size: 1.08rem; line-height: 1.5; color: rgba(255,255,255,0.92); }
.ai-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}
.ai-chip.is-pro { background: #fff; color: #1565d8; }
.ai-mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ai-mode-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border: 1px solid #d7e0ee;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 36, 79, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ai-mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(16, 36, 79, 0.12);
}
.ai-mode-card.is-ai {
  background: linear-gradient(180deg, #f7fbff 0%, #fff 55%);
  border-color: #c9daf3;
}
.ai-mode-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef4ff;
  color: #1565d8;
  font-size: 1.3rem;
}
.ai-mode-card.is-ai .ai-mode-icon { background: #1565d8; color: #fff; }
.ai-mode-card h2 { margin: 0; font-size: 1.28rem; }
.ai-mode-card p { margin: 0; line-height: 1.5; color: #3d4d66; }
.ai-mode-points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 4px;
  padding: 0;
  list-style: none;
}
.ai-mode-points li {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #0b1f4d;
  font-size: 0.78rem;
  font-weight: 700;
}
.ai-mode-card .primary-button { justify-self: start; min-height: 44px; }
.ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ai-feature-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d7e0ee;
  border-radius: 16px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ai-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16, 36, 79, 0.1);
}
.ai-feature-card h3 { margin: 0; font-size: 1rem; }
.ai-feature-card p { margin: 0; color: #5b6b82; font-size: 0.92rem; line-height: 1.4; }
.ai-feature-icon { font-size: 1.2rem; }
.ai-secondary-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-secondary-features span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f6fb;
  color: #3d4d66;
  font-size: 0.85rem;
  font-weight: 600;
}
.ai-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ai-step {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: #f6f8fc;
}
.ai-step strong { color: #0b1f4d; }
.ai-step span { color: #5b6b82; font-size: 0.92rem; }
.ai-step-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1565d8;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}
.ai-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.ai-library-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #d7e0ee;
  border-radius: 16px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ai-library-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(16, 36, 79, 0.1);
}
.ai-library-card h3 { margin: 0; font-size: 1rem; }
.ai-library-card p { margin: 0; color: #5b6b82; font-size: 0.86rem; text-transform: capitalize; }
.ai-library-card video {
  width: 100%;
  max-height: 220px;
  border-radius: 12px;
  background: #0b1f4d;
  object-fit: cover;
}
.ai-prompt-panel {
  padding: 22px;
  border: 1px solid #d7e0ee;
  border-radius: 20px;
  background: #fff;
}
.ai-prompt-panel h2 { margin: 0 0 14px; }
.ai-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ai-form-grid .ai-span-2 { grid-column: 1 / -1; }
.ai-progress-dialog { text-align: left; }
.ai-progress-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
}
.ai-progress-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #eef2f9;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(11, 31, 77, 0.12);
}
.ai-progress-fill {
  height: 100%;
  border-radius: 999px;
  width: 4%;
  background: linear-gradient(90deg, #1565d8, #3d8bff, #ff7a2b);
  background-size: 200% 100%;
  animation: ai-progress-shimmer 1.8s linear infinite;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ai-progress-shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-progress-fill { animation: none; transition: width 0.2s linear; }
}
.ai-progress-percent {
  min-width: 2.6em;
  text-align: right;
  font-size: 0.86rem;
  font-weight: 800;
  color: #1565d8;
  font-variant-numeric: tabular-nums;
}
.ai-progress-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}
.ai-progress-steps li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #8a97ab;
  font-size: 0.9rem;
  transition: color 0.25s ease;
}
.ai-progress-steps li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d7e0ee;
  background: #fff;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.ai-progress-steps li.is-active { color: #0b1f4d; font-weight: 700; }
.ai-progress-steps li.is-active::before {
  border-color: #1565d8;
  background: radial-gradient(circle, #1565d8 40%, #fff 42%);
  animation: ai-progress-pulse 1.4s ease-in-out infinite;
}
@keyframes ai-progress-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21, 101, 216, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(21, 101, 216, 0); }
}
.ai-progress-steps li.is-done { color: #0f8a56; }
.ai-progress-steps li.is-done::before {
  border-color: #0f8a56;
  background: #0f8a56 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l3.5 3.5L13 5'/%3E%3C/svg%3E") center/12px no-repeat;
}
@media (prefers-reduced-motion: reduce) {
  .ai-progress-steps li.is-active::before { animation: none; }
}
.ai-plan-human { margin-top: 8px; }
.ai-short-home-card { margin-top: 18px; }
.ai-short-form [hidden],
[data-ai-logo-upload][hidden] {
  display: none !important;
}
html:not(.ai-shorts-public) [data-ai-shorts-public] { display: none !important; }
html:not(.ai-shorts-user) [data-ai-shorts-user] { display: none !important; }
.ai-generator-card { background: linear-gradient(180deg, #f7f9fd 0%, #fff 100%); border: 1px solid #d5deea; border-radius: 22px; padding: 28px; box-shadow: 0 14px 34px rgba(16, 36, 79, 0.06); }
.ai-generator-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr); gap: 24px; align-items: start; }
.ai-generator-card textarea { min-height: 180px; font-size: 1.05rem; line-height: 1.45; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.ai-generator-card textarea:focus { border-color: #1565d8; box-shadow: 0 0 0 3px rgba(21, 101, 216, 0.14); outline: none; }
.ai-generate-btn {
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1467e4, #0e55c6);
  box-shadow: 0 12px 28px rgba(21, 101, 216, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ai-generate-btn:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(21, 101, 216, 0.34); }
.ai-quota-card { background: linear-gradient(155deg, #0b1f4d, #12326f); color: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 14px 30px rgba(11, 31, 77, 0.2); }
.ai-quota-card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.ai-quota-card .ai-quota-banner { color: #e8eef8; margin: 0; }
.ai-login-actions { display: grid; gap: 8px; margin-top: 16px; }
.ai-login-actions[hidden] { display: none !important; }
.ai-login-actions .primary-button,
.ai-login-actions .secondary-button { text-align: center; }
@media (max-width: 900px) {
  .ai-generator-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .ai-mode-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .ai-feature-grid,
  .ai-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ai-hero,
  .ai-mode-cards,
  .ai-feature-grid,
  .ai-steps,
  .ai-form-grid { grid-template-columns: 1fr; }
  .ai-hero { padding: 22px 18px; }
  .ai-hero-visual { display: none; }
}
@media (max-width: 412px) {
  .ai-short-dialog { padding: 16px; }
  .dialog-actions { flex-wrap: wrap; }
}
