:root {
  --story-bg: #f7f4f8;
  --story-panel: #ffffff;
  --story-panel-soft: #f7f2f6;
  --story-white: #ffffff;
  --story-paper: #ffffff;
  --story-text: #1b141e;
  --story-text-dark: #1b141e;
  --story-muted: #827886;
  --story-muted-dark: #776d7b;
  --story-line: rgba(37, 24, 40, 0.08);
  --story-line-dark: rgba(37, 24, 40, 0.11);
  --story-pink: #f24f78;
  --story-pink-dark: #df3d68;
  --story-violet: #8068e8;
  --story-upload-bg: #eee9f0;
  --story-control-bg: #eee9f1;
  --story-control-text: #665d6b;
  --story-active-bg: rgba(117, 97, 220, 0.11);
  --story-active-text: #4e3eb1;
  --story-input-border: rgba(31, 24, 35, 0.2);
  --story-placeholder: #9b929f;
  --story-page-glow: rgba(128, 104, 232, 0.13);
  --story-page-bg-image: url("./assets/bg/desktop.webp");
  --story-page-bg-mobile-image: url("./assets/bg/mobile.webp");
  --story-radius: 24px;
  --story-radius-small: 16px;
  --story-shadow: 0 24px 70px rgba(56, 40, 64, 0.1);
  --story-shadow-soft: 0 10px 30px rgba(56, 40, 64, 0.07);
}

* {
  box-sizing: border-box;
}

body.story-studio-page {
  background-color: var(--story-bg);
  background-image: none;
  color: var(--story-text);
}

body.story-studio-page #mainContainer {
  background: var(--story-bg);
  min-width: 0;
  padding: 0;
}

.story-simple {
  background: var(--story-bg);
  min-height: calc(100vh - 78px);
  padding: 18px 24px 64px;
}

.story-simple button,
.story-simple textarea {
  font: inherit;
}

.story-simple button {
  cursor: pointer;
}

.story-simple-header {
  align-items: flex-start;
  background-color: #ffffff;
  background-image: var(--story-page-bg-image);
  background-position: right top;
  background-repeat: no-repeat;
  background-size: auto 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  margin: 0 auto -18px;
  max-width: none;
  min-height: clamp(155px, 9vw, 175px);
  overflow: visible;
  padding: 16px 48px 28px;
  text-align: left;
}

body.story-studio-page .story-simple-header h1 {
  align-items: center;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--story-pink);
  display: inline-flex;
  flex: 0 1 auto;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 780;
  gap: 10px;
  letter-spacing: -0.035em;
  line-height: 1.25;
  margin: 0;
  max-width: 580px;
  padding: 0;
  text-align: left;
}

.story-simple-header-icon {
  display: block;
  flex: 0 0 auto;
  height: clamp(26px, 2.2vw, 34px);
  object-fit: contain;
  width: clamp(26px, 2.2vw, 34px);
}

.story-preset-tabs {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--story-line);
  border-radius: 16px;
  box-shadow: var(--story-shadow-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px;
}

.story-preset-tabs button {
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--story-muted-dark);
  font-size: 13px;
  font-weight: 650;
  min-width: 72px;
  padding: 10px 18px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.story-preset-tabs button.is-active {
  background: var(--story-pink);
  border-color: var(--story-pink);
  box-shadow: 0 7px 18px rgba(242, 79, 120, 0.24);
  color: #ffffff;
}

.story-preset-tabs button:hover:not(.is-active) {
  background: var(--story-panel-soft);
  color: var(--story-text);
}

.story-simple-layout {
  align-items: start;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr);
  margin: 0 18px;
  max-width: none;
  position: relative;
  z-index: 1;
}

.story-simple-form {
  background-color: #ffffff;
  background-image: none;
  border: 1px solid var(--story-line-dark);
  border-radius: var(--story-radius);
  box-shadow: var(--story-shadow);
  color: var(--story-text-dark);
  padding: 30px;
}

.story-simple-block {
  border-bottom: 1px solid var(--story-line-dark);
  padding: 0 0 30px;
}

.story-simple-block + .story-simple-block {
  padding-top: 30px;
}

.story-simple-title {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.story-simple-title > span {
  align-items: center;
  background: linear-gradient(145deg, rgba(242, 79, 120, 0.16), rgba(128, 104, 232, 0.12));
  border: 1px solid rgba(242, 79, 120, 0.11);
  border-radius: 12px;
  color: var(--story-pink-dark);
  display: inline-flex;
  flex: 0 0 40px;
  font-size: 13px;
  font-weight: 800;
  height: 40px;
  justify-content: center;
}

.story-simple-title h2 {
  color: var(--story-text-dark);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.3;
  margin: 0 0 3px;
}

.story-simple-title p {
  color: var(--story-muted-dark);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.story-prompt-layout {
  align-items: flex-start;
  display: grid;
  gap: 20px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.story-prompt-layout .story-simple-title {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
  min-width: 0;
}

.story-prompt-layout .story-prompt-field {
  grid-column: 1 / -1;
  grid-row: 2;
}

.story-random-prompt {
  align-items: center;
  background: linear-gradient(135deg, var(--story-pink), #e93c87);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(242, 79, 120, 0.24);
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 750;
  gap: 7px;
  min-height: 42px;
  padding: 0 17px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  grid-column: 2;
  grid-row: 1;
}

.story-random-prompt:hover {
  box-shadow: 0 13px 28px rgba(242, 79, 120, 0.32);
  transform: translateY(-1px);
}

.story-random-prompt:focus-visible {
  outline: 3px solid rgba(242, 79, 120, 0.22);
  outline-offset: 3px;
}

.story-random-prompt svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.story-upload-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-upload-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  padding: 0;
  position: relative;
  transition: transform 0.2s ease;
}

.story-upload-item:hover {
  box-shadow: none;
  transform: translateY(-2px);
}

.story-upload-label {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(42, 27, 48, 0.13);
  color: var(--story-text-dark);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 7px;
  left: 12px;
  margin: 0;
  padding: 7px 11px 7px 8px;
  position: absolute;
  top: 12px;
  z-index: 4;
}

.story-upload-label svg {
  fill: none;
  flex: 0 0 18px;
  height: 18px;
  stroke: var(--story-pink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 18px;
}

.story-upload-button {
  --story-preview-backdrop: none;
  aspect-ratio: 4 / 3;
  background: var(--story-upload-bg);
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  display: block;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.story-upload-button::before {
  content: none;
}

.story-upload-button::after {
  content: none;
}

.story-upload-button:hover {
  box-shadow: none;
}

.story-upload-button img {
  background: var(--story-upload-bg);
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: relative;
  width: 100%;
  z-index: 2;
}

.story-upload-button > span {
  backdrop-filter: blur(10px);
  background: rgba(21, 14, 24, 0.76);
  border-radius: 999px;
  bottom: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  left: 50%;
  padding: 8px 13px;
  position: absolute;
  transform: translateX(-50%);
  z-index: 3;
  white-space: nowrap;
}

.story-file-input {
  display: none;
}

.story-prompt-field {
  display: block;
}

.story-prompt-field textarea {
  background: var(--story-panel-soft);
  border: 1px solid var(--story-line-dark);
  border-radius: var(--story-radius-small);
  color: var(--story-text-dark);
  display: block;
  font-size: 15px;
  line-height: 1.7;
  min-height: 180px;
  outline: 0;
  padding: 19px 20px;
  resize: vertical;
  scroll-margin-block: 24px max(160px, 35vh);
  touch-action: pan-y;
  width: 100%;
}

.story-prompt-field textarea:focus {
  background: var(--story-white);
  border-color: var(--story-violet);
  box-shadow: 0 0 0 4px rgba(128, 104, 232, 0.11), var(--story-shadow-soft);
}

.story-prompt-field textarea::placeholder {
  color: var(--story-placeholder);
  font-style: normal;
  opacity: 1;
}

.story-prompt-field textarea:focus::placeholder {
  color: transparent;
}

.story-output-settings {
  border-bottom: 0;
  padding-bottom: 18px;
}

.story-choice-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 0.8fr 1.2fr;
}

.story-choice-group {
  background: var(--story-panel-soft);
  border: 1px solid var(--story-line);
  border-radius: var(--story-radius-small);
  padding: 15px;
}

.story-choice-group > b {
  color: var(--story-muted-dark);
  display: block;
  font-size: 11px;
  margin-bottom: 8px;
}

.story-chip-group {
  display: grid;
  gap: 6px;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
}

.story-chip-group button {
  background: var(--story-panel);
  border: 1px solid var(--story-line);
  border-radius: 10px;
  color: var(--story-control-text);
  font-size: 12px;
  font-weight: 650;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
}

.story-chip-group button.is-active {
  background: linear-gradient(145deg, var(--story-active-bg), rgba(242, 79, 120, 0.08));
  border-color: var(--story-violet);
  box-shadow: 0 6px 16px rgba(128, 104, 232, 0.11);
  color: var(--story-active-text);
}

.story-summary {
  display: none;
}

.story-generate {
  align-items: center;
  background: linear-gradient(135deg, var(--story-pink), var(--story-pink-dark) 58%, #d63e8f);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(242, 79, 120, 0.27);
  color: #fff;
  display: flex;
  justify-content: center;
  isolation: isolate;
  margin-top: 6px;
  min-height: 66px;
  overflow: hidden;
  padding: 10px 22px;
  position: relative;
  width: 100%;
}

.story-generate:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.story-generate:disabled {
  cursor: wait;
  filter: none;
  opacity: 1;
  transform: none;
}

.story-generate.is-generating {
  animation: story-generate-gradient 1.8s ease-in-out infinite;
  background: linear-gradient(105deg, #7657e8 0%, #a84ee6 24%, #f24f78 52%, #e33d9b 76%, #7657e8 100%);
  background-size: 240% 100%;
  box-shadow: 0 16px 38px rgba(184, 70, 204, 0.32);
}

.story-generate.is-generating::after {
  animation: story-generate-sheen 1.55s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  content: "";
  inset: 0 auto 0 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-150%) skewX(-18deg);
  width: 38%;
  z-index: 0;
}

.story-generate span {
  font-size: 17px;
  font-weight: 750;
  position: relative;
  z-index: 1;
}

.story-generate em {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-style: normal;
  margin-left: 12px;
  padding-left: 12px;
  position: relative;
  z-index: 1;
}

@keyframes story-generate-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes story-generate-sheen {
  0% { transform: translateX(-150%) skewX(-18deg); }
  62%, 100% { transform: translateX(365%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .story-generate.is-generating,
  .story-generate.is-generating::after,
  .story-generation-status .story-status-track > span,
  .story-generation-status .story-status-track > span::after,
  .story-status-steps li.is-active i {
    animation: none;
  }
}

.story-progress {
  margin-top: 0;
}

.story-progress p {
  color: var(--story-muted-dark);
  font-size: 11px;
  margin: 12px 0 0;
  text-align: center;
}

.story-progress p:empty {
  display: none;
}

.story-result {
  background: var(--story-panel);
  border: 1px solid var(--story-line);
  border-radius: var(--story-radius);
  box-shadow: var(--story-shadow);
  overflow: hidden;
  position: sticky;
  top: 24px;
}

.story-result header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 21px 22px 17px;
}

.story-result header span {
  color: var(--story-pink);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}

.story-result header h2 {
  color: var(--story-text);
  font-size: 20px;
  font-weight: 760;
  margin: 0;
}

.story-result header > b {
  background: var(--story-panel-soft);
  border: 1px solid var(--story-line);
  border-radius: 999px;
  color: var(--story-muted);
  font-size: 10px;
  padding: 7px 10px;
}

.story-generation-status {
  background:
    radial-gradient(circle at 0 0, rgba(242, 79, 120, 0.09), transparent 42%),
    radial-gradient(circle at 100% 0, rgba(128, 104, 232, 0.1), transparent 44%),
    var(--story-panel);
  border: 1px solid var(--story-line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 10px 28px rgba(56, 40, 64, 0.055);
  margin: 16px 14px 0;
  min-height: 174px;
  padding: 20px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.story-generation-status[data-phase="prompting"],
.story-generation-status[data-phase="submitting"],
.story-generation-status[data-phase="queued"],
.story-generation-status[data-phase="processing"],
.story-generation-status[data-phase="finalizing"] {
  border-color: color-mix(in srgb, var(--story-violet) 24%, var(--story-line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 14px 34px rgba(128, 104, 232, 0.09);
}

.story-status-summary {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.story-status-summary small {
  color: var(--story-muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.story-status-summary strong {
  color: var(--story-text);
  display: block;
  font-size: 17px;
  font-weight: 780;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.story-status-eta {
  background: color-mix(in srgb, var(--story-panel-soft) 88%, transparent);
  border: 1px solid var(--story-line);
  border-radius: 13px;
  flex: 0 0 auto;
  min-width: 86px;
  padding: 8px 11px;
  text-align: right;
}

.story-status-eta small {
  margin-bottom: 2px;
}

.story-status-eta strong {
  color: var(--story-pink-dark);
  font-size: 15px;
}

.story-status-track {
  background: color-mix(in srgb, var(--story-violet) 11%, var(--story-panel-soft));
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(37, 24, 40, 0.08);
  height: 9px;
  margin-top: 17px;
  overflow: hidden;
}

.story-status-track > span {
  background: linear-gradient(100deg, #f24f78 0%, #d54bba 30%, #8068e8 64%, #f24f78 100%);
  background-size: 220% 100%;
  border-radius: inherit;
  display: block;
  height: 100%;
  overflow: hidden;
  position: relative;
  transform-origin: left center;
  transition: width 0.6s ease;
  width: 0;
}

.story-generation-status[data-phase="prompting"] .story-status-track > span,
.story-generation-status[data-phase="submitting"] .story-status-track > span,
.story-generation-status[data-phase="queued"] .story-status-track > span,
.story-generation-status[data-phase="processing"] .story-status-track > span,
.story-generation-status[data-phase="finalizing"] .story-status-track > span {
  animation: story-status-gradient 1.55s linear infinite;
}

.story-generation-status[data-phase="prompting"] .story-status-track > span::after,
.story-generation-status[data-phase="submitting"] .story-status-track > span::after,
.story-generation-status[data-phase="queued"] .story-status-track > span::after,
.story-generation-status[data-phase="processing"] .story-status-track > span::after,
.story-generation-status[data-phase="finalizing"] .story-status-track > span::after {
  animation: story-status-sheen 1.35s ease-in-out infinite;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  transform: translateX(-160%) skewX(-20deg);
  width: 42%;
}

.story-generation-status[data-phase="failed"] .story-status-track > span {
  background: #d9485f;
}

.story-status-steps {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 15px 0 0;
  padding: 0;
  position: relative;
}

.story-status-steps::before {
  background: var(--story-line-dark);
  content: "";
  height: 1px;
  left: 12.5%;
  position: absolute;
  right: 12.5%;
  top: 6px;
}

.story-status-steps li {
  align-items: center;
  color: var(--story-muted);
  display: flex;
  flex-direction: column;
  font-size: 10px;
  font-weight: 680;
  gap: 7px;
  min-width: 0;
  position: relative;
  text-align: center;
  white-space: nowrap;
  z-index: 1;
}

.story-status-steps i {
  background: var(--story-panel);
  border: 2px solid var(--story-line-dark);
  border-radius: 50%;
  display: block;
  flex: 0 0 13px;
  height: 13px;
  width: 13px;
}

.story-status-steps li.is-active {
  color: var(--story-pink-dark);
}

.story-status-steps li.is-active i {
  animation: story-status-pulse 1.5s ease-out infinite;
  background: var(--story-pink);
  border-color: color-mix(in srgb, var(--story-pink) 30%, var(--story-panel));
  box-shadow: 0 0 0 4px rgba(241, 90, 122, 0.14);
}

.story-status-steps li.is-complete {
  color: var(--story-active-text);
}

.story-status-steps li.is-complete i {
  background: var(--story-violet);
  border-color: color-mix(in srgb, var(--story-violet) 32%, var(--story-panel));
}

.story-status-detail {
  align-items: center;
  border-top: 1px solid var(--story-line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
}

.story-status-detail span {
  color: var(--story-muted);
  font-size: 10px;
  line-height: 1.55;
}

.story-status-detail b {
  background: color-mix(in srgb, var(--story-panel-soft) 88%, transparent);
  border: 1px solid var(--story-line-dark);
  border-radius: 999px;
  color: var(--story-text);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 650;
  padding: 5px 8px;
}

@keyframes story-status-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@keyframes story-status-sheen {
  0% { transform: translateX(-160%) skewX(-20deg); }
  70%, 100% { transform: translateX(340%) skewX(-20deg); }
}

@keyframes story-status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(241, 90, 122, 0.28); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(241, 90, 122, 0); }
}

.story-generation-status[data-phase="processing"] .story-status-detail b,
.story-generation-status[data-phase="queued"] .story-status-detail b {
  color: var(--story-pink-dark);
}

.story-generation-status[data-phase="failed"] .story-status-summary strong,
.story-generation-status[data-phase="failed"] .story-status-detail b {
  color: #d9485f;
}

.story-result-video {
  background: #050406;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(17, 10, 20, 0.18);
  margin: 0 14px;
  overflow: hidden;
}

.story-result-video video {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.story-result-meta {
  align-items: center;
  display: flex;
  gap: 7px;
  padding: 13px 18px 18px;
}

.story-result-meta span {
  color: var(--story-muted);
  font-size: 10px;
  margin-right: auto;
}

.story-result-meta b {
  background: var(--story-panel-soft);
  border-radius: 7px;
  color: var(--story-text);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 8px;
}

@media (max-width: 991px) {
  .story-simple-header {
    min-height: 160px;
  }

  .story-simple {
    padding: 24px 18px 48px;
  }

  .story-simple-layout {
    grid-template-columns: 1fr;
    margin: 0 10px;
    max-width: none;
  }

  .story-result {
    position: static;
  }

  .story-result-video {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 767.98px) {
  body.story-studio-page #mainContainer {
    padding-bottom: 74px;
  }

  .story-simple {
    min-height: 100vh;
    padding: 12px 12px 28px;
  }

  .story-simple-header {
    align-items: flex-start;
    background-image: var(--story-page-bg-mobile-image);
    background-position: right top;
    background-size: auto 100%;
    border-radius: 0;
    gap: 12px;
    margin-bottom: -8px;
    min-height: 130px;
    padding: 10px 14px 18px;
  }

  body.story-studio-page .story-simple-header h1 {
    font-size: 15px;
    gap: 8px;
    max-width: 100%;
    padding: 0;
    white-space: nowrap;
  }

  .story-simple-header-icon {
    height: 24px;
    width: 24px;
  }

  .story-preset-tabs {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.94);
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: none;
  }

  .story-preset-tabs::-webkit-scrollbar {
    display: none;
  }

  .story-preset-tabs button {
    flex: 1 0 auto;
    min-width: 62px;
    padding: 8px 12px;
  }

  .story-simple-layout {
    gap: 12px;
    margin: 0;
  }

  .story-simple-form {
    border-radius: 20px;
    padding: 12px;
  }

  .story-simple-block {
    padding-bottom: 19px;
  }

  .story-simple-block + .story-simple-block {
    padding-top: 19px;
  }

  .story-simple-title {
    gap: 9px;
    margin-bottom: 13px;
  }

  .story-simple-title > span {
    flex-basis: 32px;
    height: 32px;
  }

  .story-simple-title h2 {
    font-size: 17px;
  }

  .story-simple-title p {
    font-size: 11px;
  }

  .story-prompt-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .story-prompt-layout .story-simple-title {
    grid-column: 1;
    grid-row: auto;
    margin-bottom: 0;
  }

  .story-prompt-layout .story-prompt-field {
    grid-column: 1;
    grid-row: auto;
  }

  .story-random-prompt {
    grid-column: 1;
    grid-row: auto;
    justify-content: center;
    font-size: 12px;
    min-height: 38px;
    padding: 0 14px;
    width: 100%;
  }

  .story-upload-row {
    gap: 6px;
  }

  .story-upload-item {
    border-radius: 0;
    padding: 0;
  }

  .story-upload-label {
    border-radius: 8px;
    font-size: 10px;
    gap: 4px;
    left: 6px;
    margin: 0;
    padding: 5px 7px 5px 5px;
    top: 6px;
  }

  .story-upload-label svg {
    flex-basis: 14px;
    height: 14px;
    width: 14px;
  }

  .story-upload-button {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
  }

  .story-upload-button > span {
    bottom: 6px;
    font-size: 8px;
    padding: 5px 7px;
  }

  .story-prompt-field textarea {
    font-size: 16px;
    min-height: 150px;
    padding: 14px;
  }

  .story-choice-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .story-chip-group button {
    font-size: 12px;
  }

  .story-generate {
    min-height: 58px;
  }

  .story-result {
    border-radius: 20px;
  }

  .story-result header {
    padding: 17px 16px 14px;
  }

  .story-result-video {
    border-radius: 14px;
    margin: 0 8px;
  }

  .story-generation-status {
    border-radius: 14px;
    margin: 8px 8px 0;
    min-height: 0;
    padding: 14px;
  }

  .story-result-meta {
    padding: 12px 14px 15px;
  }

  .story-status-steps li {
    align-items: center;
    flex-direction: column;
    gap: 4px;
  }

  .story-status-detail {
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .story-simple {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 390px) {
  .story-upload-button > span {
    background: rgba(17, 12, 20, 0.8);
    border-radius: 0;
    bottom: 0;
    left: 0;
    padding: 5px 4px;
    right: 0;
    text-align: center;
    transform: none;
  }
}

html.aihx-embedded {
  background: var(--story-bg);
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scroll-padding-block: 18px max(48px, 30vh);
  -webkit-overflow-scrolling: touch;
}

html.aihx-embedded body.story-studio-page,
html.aihx-embedded body.story-studio-page #app {
  height: auto;
  min-height: 100%;
  overflow: visible;
  padding-bottom: 0;
}

html.aihx-embedded .story-simple {
  min-height: 100%;
}

html.aihx-embedded body.story-studio-page #mainContainer {
  height: auto;
  max-width: none;
  min-height: 100%;
  overflow: visible;
  padding-bottom: 0;
  touch-action: pan-y;
  width: 100%;
}

.story-campaign-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(240, 82, 125, .22);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 241, 246, .98), rgba(249, 242, 255, .96));
  color: #332534;
}

.story-campaign-notice[hidden] { display: none; }

.story-campaign-notice > b {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f4517a, #c455dd);
  color: #fff;
  font-size: 15px;
}

.story-campaign-notice strong,
.story-campaign-notice span { display: block; }
.story-campaign-notice strong { font-size: 14px; }
.story-campaign-notice span {
  margin-top: 2px;
  color: #897788;
  font-size: 12px;
}
