/* Final homepage polish: Aurora treatment for composer and business cards only. */

#page-home {
  --accent: #55e7ba;
  --accent-2: #2dbed2;
}

#page-home > .reference-upload-tip {
  position: fixed;
  top: 24px;
  right: 28px;
  bottom: auto;
  left: auto;
  z-index: 2200;
  width: min(360px, calc(100vw - 40px));
  min-height: 44px;
  justify-content: flex-start;
  line-height: 1.45;
  transform: translateY(-8px);
}

#page-home > .reference-upload-tip.show {
  transform: translateY(0);
}

#page-home > .reference-upload-tip strong {
  min-width: 0;
}

@media (max-width: 720px) {
  #page-home > .reference-upload-tip {
    top: 12px;
    right: 10px;
    width: min(360px, calc(100vw - 20px));
  }
}

body.generation-page-active {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body.generation-page-active .page-shell {
  min-height: 100vh;
  padding-bottom: 28px;
  overflow: visible;
}

#page-home .home-quick-input-panel,
#page-home .home-business-shortcuts,
#page-commercial-creation .commercial-composer,
#page-commercial-creation .commercial-progress-panel {
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

#page-home .home-mode-selectors {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: 4px;
  min-height: 48px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(85, 231, 186, 0.17);
  border-radius: 999px;
  background: rgba(0, 20, 18, 0.66);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 10px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px) saturate(1.15);
}

#page-home .home-mode-selectors::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 16px) / 2);
  border: 1px solid rgba(145, 255, 224, 0.46);
  border-radius: 999px;
  content: "";
  opacity: 0;
  transform: translateX(0) scale(0.94);
  background: linear-gradient(135deg, rgba(104, 237, 194, 0.96), rgba(66, 203, 211, 0.9));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.28),
    0 5px 16px rgba(54, 211, 194, 0.16);
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    box-shadow 240ms ease;
  pointer-events: none;
}

#page-home .home-mode-selectors::after {
  position: absolute;
  bottom: 3px;
  left: 4px;
  z-index: 3;
  width: calc((100% - 16px) / 2);
  height: 1px;
  border-radius: 999px;
  content: "";
  opacity: 0;
  transform: translateX(0) scaleX(0.38);
  background: linear-gradient(90deg, transparent 10%, rgba(218, 255, 246, 0.2) 26%, #e3fff7 50%, rgba(83, 232, 211, 0.54) 72%, transparent 92%);
  box-shadow: 0 0 8px rgba(85, 231, 186, 0.5);
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
  pointer-events: none;
}

#page-home .home-mode-selectors:has(.home-mode-button[aria-pressed="true"])::before {
  opacity: 1;
  transform: translateX(0) scale(1);
}

#page-home .home-mode-selectors:has(.home-mode-button[aria-pressed="true"])::after {
  opacity: 0.82;
  transform: translateX(0) scaleX(0.72);
}

#page-home .home-mode-selectors:has(.home-mode-button:nth-child(2)[aria-pressed="true"])::before {
  transform: translateX(calc(100% + 4px)) scale(1);
}

#page-home .home-mode-selectors:has(.home-mode-button:nth-child(2)[aria-pressed="true"])::after {
  transform: translateX(calc(100% + 4px)) scaleX(0.72);
}

#page-home .home-mode-button {
  position: relative;
  z-index: 1;
  min-width: 128px;
  height: 38px;
  padding: 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: rgba(211, 239, 232, 0.76);
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  transition:
    color 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 220ms ease;
}

#page-home .home-mode-button::after {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  content: "";
  opacity: 0;
  transform: scale(0.9);
  background: linear-gradient(180deg, rgba(85, 231, 186, 0.1), rgba(45, 190, 210, 0.055));
  transition:
    opacity 200ms ease,
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

#page-home .home-mode-button::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: -30%;
  z-index: -1;
  width: 24%;
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: translateX(-130%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(180, 255, 237, 0.18), rgba(217, 255, 247, 0.28), transparent);
  filter: blur(1px);
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 140ms ease;
  pointer-events: none;
}

#page-home .home-mode-button:hover:not([aria-pressed="true"]) {
  color: #ecfff9;
  text-shadow: 0 0 16px rgba(85, 231, 186, 0.24);
}

#page-home .home-mode-button:hover:not([aria-pressed="true"])::after {
  opacity: 1;
  transform: scale(1);
}

#page-home .home-mode-button:hover:not([aria-pressed="true"])::before {
  opacity: 1;
  transform: translateX(560%) skewX(-18deg);
}

#page-home .home-mode-button[aria-pressed="true"] {
  border-color: transparent;
  color: #041b16;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 1px rgba(255, 255, 255, 0.2);
}

#page-home .home-mode-button:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

#page-home .home-mode-button:focus {
  outline: 0;
}

#page-home .home-mode-button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 2px rgba(0, 20, 18, 0.94),
    0 0 0 4px rgba(85, 231, 186, 0.66);
}

/* 路跑切片：独立于胶囊组、靠右放置的模式按钮 */
#page-home .home-mode-button--broll {
  min-width: 120px;
  height: 38px;
  padding: 0 20px;
  border: 1px solid rgba(85, 231, 186, 0.28);
  border-radius: 999px;
  color: rgba(211, 239, 232, 0.82);
  background: rgba(85, 231, 186, 0.06);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

#page-home .home-mode-button--broll::before,
#page-home .home-mode-button--broll::after {
  display: none;
}

#page-home .home-mode-button--broll:hover:not([aria-pressed="true"]) {
  border-color: rgba(85, 231, 186, 0.55);
  color: #ecfff9;
  background: rgba(85, 231, 186, 0.12);
  text-shadow: 0 0 16px rgba(85, 231, 186, 0.24);
}

#page-home .home-mode-button--broll[aria-pressed="true"] {
  border-color: transparent;
  color: #041b16;
  background: linear-gradient(180deg, #5ce7c4, #2dd9c2);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.28),
    0 5px 18px rgba(54, 211, 194, 0.28);
  text-shadow: 0 1px rgba(255, 255, 255, 0.2);
}

#page-home .home-business-entry:active {
  transform: translateY(1px);
}

#page-home .home-quick-input-panel,
#page-commercial-creation .commercial-composer {
  --card-glow: 85, 231, 186;
  isolation: isolate;
  border: 1px solid rgba(80, 224, 176, 0.19);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 6%, rgba(51, 199, 193, 0.11), transparent 28%),
    linear-gradient(145deg, rgba(5, 33, 29, 0.76), rgba(0, 13, 14, 0.9));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.075),
    inset 0 0 42px rgba(var(--card-glow), 0.06),
    0 18px 48px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(var(--card-glow), 0.055),
    0 0 42px rgba(var(--card-glow), 0.14);
  backdrop-filter: blur(18px);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

#page-home .home-quick-input-panel:focus-within,
#page-commercial-creation .commercial-composer:focus-within {
  border-color: rgba(85, 231, 186, 0.42);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 54px rgba(var(--card-glow), 0.1),
    0 28px 64px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(var(--card-glow), 0.14),
    0 0 56px rgba(var(--card-glow), 0.24);
}

.home-composer-footer .simple-submit-fab,
#page-commercial-creation .commercial-generate-button.simple-submit-fab {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  display: inline-grid;
  border: 1px solid rgba(80, 224, 176, 0.55);
  border-radius: 50%;
  color: #041b16;
  background: linear-gradient(145deg, #4ce1ba, #19a9d0);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.26),
    0 8px 24px rgba(54, 211, 194, 0.17);
  place-items: center;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.simple-submit-task-label {
  display: none;
  white-space: nowrap;
}

/* Keep the tooltip inside the page when the submit button sits at the right edge. */
#page-home .simple-submit-wrap::after {
  left: auto;
  right: 0;
  transform: translateY(6px);
}

#page-home .simple-submit-wrap:hover::after,
#page-home .simple-submit-wrap.is-tooltip-visible::after {
  transform: translateY(0);
}

/* 首页和自由创作共用生成前积分预估样式。 */
.simple-submit-points {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  margin-right: 12px;
  padding: 5px 11px;
  border: 1px solid rgba(80, 224, 176, 0.24);
  border-radius: 999px;
  color: #8df2d3;
  background: rgba(80, 224, 176, 0.07);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.simple-submit-points[hidden] {
  display: none !important;
}

.simple-submit-points svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #73edc7;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.simple-submit-points b {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.2px;
}

#commercial-submit-points {
  min-width: 0;
  max-width: calc(100% - 60px);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
  text-align: right;
  border-radius: 12px;
}

#page-commercial-creation .commercial-submit-row {
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.home-composer-footer .simple-submit-wrap.is-task-entry,
.home-composer-footer .simple-submit-wrap.is-task-entry .simple-submit-fab {
  width: auto;
  min-width: 0;
}

.home-composer-footer .simple-submit-wrap.is-task-entry .simple-submit-fab {
  min-height: 44px;
  height: 44px;
  padding: 0 16px 0 13px;
  display: inline-flex;
  gap: 8px;
  border-radius: 999px;
}

.home-composer-footer .simple-submit-wrap.is-task-entry .submit-arrow-icon {
  width: 17px;
  height: 17px;
  transform: rotate(90deg);
}

.home-composer-footer .simple-submit-wrap.is-task-entry .simple-submit-task-label {
  display: inline;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.home-composer-footer .simple-submit-fab:hover:not(:disabled),
#page-commercial-creation .commercial-generate-button.simple-submit-fab:hover:not(:disabled) {
  border-color: rgba(104, 237, 194, 0.82);
  background: linear-gradient(145deg, #68edc2, #31bdd5);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.32),
    0 0 26px rgba(55, 224, 174, 0.24),
    0 10px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.home-composer-footer .simple-submit-fab:focus-visible,
#page-commercial-creation .commercial-generate-button.simple-submit-fab:focus-visible {
  outline: 2px solid #68edc2;
  outline-offset: 3px;
}

.home-composer-footer .simple-submit-fab:active:not(:disabled),
#page-commercial-creation .commercial-generate-button.simple-submit-fab:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}

.home-composer-footer .simple-submit-fab:disabled,
#page-commercial-creation .commercial-generate-button.simple-submit-fab:disabled {
  border-color: rgba(112, 169, 158, 0.2);
  color: rgba(214, 239, 236, 0.46);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  transform: none;
}

#page-home .home-composer-mode-row {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(85, 231, 186, 0.1);
}

#page-home .home-intent-area {
  position: relative;
  min-height: 128px;
  transition: min-height 220ms ease;
}

#page-home .home-quick-input-panel:has(#home-advanced-fields:not([hidden])) .home-intent-area {
  min-height: 158px;
}

#page-home .home-intent-label {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  color: #67baa6;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  transition: left 180ms ease;
}

#page-home .home-intent-area:has(> #reference-upload-stack:not([hidden])) .home-intent-label {
  left: 112px;
}

#page-home .home-intent-area #home-intent-input {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 128px;
  height: 128px;
  padding: 45px 20px 16px;
  transition: height 220ms ease, min-height 220ms ease, padding 180ms ease;
}

#page-home .home-intent-inline-hint {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  width: max-content;
  max-width: 0;
  min-width: 0;
  height: 27px;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #83aaa5;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.75;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0.78;
  pointer-events: auto;
  transition: color 160ms ease, opacity 160ms ease;
}

#page-home .home-intent-inline-hint[hidden] {
  display: none;
}

#page-home .home-reference-fallback-hint {
  position: absolute;
  top: 76px;
  left: 112px;
  z-index: 2;
  max-width: calc(100% - 132px);
  overflow: hidden;
  color: rgba(164, 202, 196, 0.48);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

#page-home .home-reference-fallback-hint[hidden] {
  display: none;
}

#page-home .home-input-precedence-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -2px 20px 10px;
  padding: 8px 11px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 9px;
  background: rgba(251, 191, 36, 0.07);
  color: rgba(255, 232, 166, 0.9);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

#page-home .home-input-precedence-hint[hidden] {
  display: none;
}

#page-home .home-input-precedence-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  border: 1px solid rgba(251, 191, 36, 0.48);
  border-radius: 50%;
  color: #fbd36b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

#page-home #home-intent-hint-suffix {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-home .home-intent-inline-hint kbd {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(85, 231, 186, 0.22);
  border-radius: 5px;
  color: #7fd4be;
  background: rgba(3, 31, 27, 0.88);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045);
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.03em;
}

#page-home .home-intent-inline-hint:hover,
#page-home .home-intent-inline-hint:focus-visible {
  color: #bcebdd;
  opacity: 1;
  outline: 0;
}

#page-home .home-intent-inline-hint:hover kbd,
#page-home .home-intent-inline-hint:focus-visible kbd {
  border-color: rgba(85, 231, 186, 0.48);
  color: #baffeb;
  background: rgba(85, 231, 186, 0.12);
}

#page-home .home-quick-input-panel:has(#home-advanced-fields:not([hidden])) .home-intent-area #home-intent-input {
  min-height: 158px;
  height: 158px;
}

#page-home .home-intent-area:has(> #reference-upload-stack:not([hidden])) #home-intent-input {
  padding-left: 112px;
}

#page-home .home-intent-area > .reference-upload-stack {
  position: absolute;
  top: calc(50% - 5px);
  left: 20px;
  z-index: 12;
  width: 74px;
  min-width: 74px;
  min-height: 82px;
  padding-top: 0;
  transform: translateY(-50%);
}

#page-home .home-intent-area > .reference-upload-stack .reference-upload-button {
  flex-direction: column;
  gap: 5px;
}

#page-home .home-intent-area > .reference-upload-stack .reference-upload-button small {
  font-size: 9px;
}

#page-home .home-advanced-fields {
  padding: 11px 20px 13px;
  border-top: 1px solid rgba(85, 231, 186, 0.1);
  background: rgba(0, 15, 14, 0.22);
}

#page-home .home-advanced-fields .workflow-structured-fields {
  grid-template-columns: minmax(190px, 0.9fr) minmax(320px, 2.1fr) minmax(130px, 0.65fr);
  gap: 10px;
}

#page-home .home-advanced-fields .workflow-structured-fields.without-selling-point {
  grid-template-columns: minmax(240px, 1.35fr) minmax(160px, 0.65fr);
}

#page-home .home-advanced-fields .workflow-structured-fields.without-selling-point .workflow-count-field .workflow-control-label::before {
  content: "02";
}

#page-home .home-advanced-fields .workflow-output-field {
  display: none;
}

#page-home .home-advanced-fields .workflow-control-label {
  margin-bottom: 7px;
  color: #67baa6;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

#page-home .home-advanced-fields select,
#page-home .home-advanced-fields .select-panel-title {
  min-height: 44px;
  border-radius: 12px;
}

/* Visible control sizing must not stretch the clipped native select underneath it. */
#page-home .home-advanced-fields select.native-select-hidden,
#page-commercial-creation .commercial-parameters select.native-select-hidden {
  width: 1px;
  min-width: 0;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
}

#page-home .home-composer-footer {
  min-height: 58px;
  padding-inline: 20px;
  border-top: 1px solid rgba(85, 231, 186, 0.1);
  background: linear-gradient(90deg, rgba(80, 224, 176, 0.025), transparent 48%);
}

#page-home #home-intent-input {
  color: #eafff9;
  font-size: 15px;
  line-height: 1.75;
}

#page-home #home-intent-input:focus {
  border-color: transparent;
  outline: 0;
  box-shadow: none;
  transform: none;
}

#page-home #advanced-toggle.home-advanced-entry {
  border-color: rgba(80, 224, 176, 0.18);
  border-radius: 999px;
  background: rgba(80, 224, 176, 0.045);
}

#page-home .home-business-shortcuts {
  gap: 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.generation-page {
  min-height: calc(100dvh - (var(--page-y) * 2));
  padding: 0 0 48px;
}

.generation-page-layout {
  display: grid;
  width: 100%;
  gap: 22px;
}

.generation-source-context {
  display: grid;
  gap: 0;
}

.generation-page .generation-banner {
  position: relative;
  min-height: clamp(220px, 29vw, 292px);
}

.generation-page .generation-banner-copy {
  padding-top: clamp(68px, 5.4vw, 78px);
}

.generation-back-link {
  position: absolute;
  top: 18px;
  /* Keep the label aligned with the banner copy; the 17px icon and 6px gap sit to its left. */
  left: calc(clamp(18px, 3.8vw, 58px) - 23px);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0;
  border: 0;
  color: rgba(207, 235, 229, 0.74);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.generation-back-link svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.generation-back-link:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

.generation-back-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(85, 231, 186, 0.72);
  outline-offset: 4px;
}

.generation-request-snapshot {
  position: relative;
  isolation: isolate;
  min-height: 245px;
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(48, 192, 192, 0.08), transparent 32%),
    linear-gradient(145deg, rgba(4, 30, 27, 0.82), rgba(0, 16, 16, 0.94));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.055),
    0 18px 48px rgba(0, 0, 0, 0.18),
    0 0 34px rgba(85, 231, 186, 0.08);
}

.generation-request-snapshot::before {
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 2px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(85, 231, 186, 0.82), transparent);
  box-shadow: 0 0 14px rgba(85, 231, 186, 0.58), 0 0 34px rgba(85, 231, 186, 0.3);
  opacity: 0.72;
}

.generation-request-modes {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 4px;
  margin: 10px 16px 0;
  padding: 4px;
  border: 1px solid rgba(80, 224, 176, 0.17);
  border-radius: 999px;
  background: rgba(0, 17, 16, 0.62);
}

.generation-request-modes span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.generation-request-modes span.is-active {
  color: #002019;
  background: linear-gradient(135deg, #62e6be, #45c9d4);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.42), 0 8px 22px rgba(43, 209, 174, 0.16);
}

.generation-request-content {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 128px;
  padding: 18px 20px 16px;
}

.generation-reference-tile {
  display: grid;
  flex: 0 0 60px;
  width: 60px;
  height: 82px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: 10px;
  color: #9ac8bf;
  background: rgba(2, 22, 21, 0.74);
  transform: rotate(-4deg);
}

.generation-reference-tile b {
  font-size: 24px;
  font-weight: 400;
}

.generation-reference-tile small {
  font-size: 10px;
}

.generation-request-copy {
  min-width: 0;
}

.generation-request-copy > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.generation-request-copy p {
  margin: 12px 0 0;
  color: var(--body-ink);
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.65;
  white-space: pre-wrap;
}

.generation-request-footer {
  min-height: 58px;
  padding: 11px 20px;
  border-top: 1px solid rgba(80, 224, 176, 0.1);
}

.generation-request-footer span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(80, 224, 176, 0.18);
  border-radius: 999px;
  color: #acd2cb;
  background: rgba(80, 224, 176, 0.045);
  font-size: 12px;
  font-weight: 800;
}

.generation-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  padding: 0 4px 22px;
  border-bottom: 1px solid rgba(85, 231, 186, 0.12);
}

.generation-page-header h2 {
  margin: 5px 0 7px;
  color: var(--body-ink);
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.045em;
}

.generation-page-header > div > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.generation-page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.generation-page-actions .ghost-button {
  min-height: 42px;
  padding: 0 17px;
  border-color: rgba(85, 231, 186, 0.24);
  border-radius: 999px;
  color: var(--body-ink);
  background: rgba(85, 231, 186, 0.045);
}

.generation-page-actions .ghost-button:hover {
  border-color: rgba(85, 231, 186, 0.48);
  background: rgba(85, 231, 186, 0.1);
}

.generation-page .generation-workspace-panel {
  width: 100%;
  min-height: clamp(420px, 68dvh, 760px);
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0.19);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 6%, rgba(51, 199, 193, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(5, 33, 29, 0.76), rgba(0, 13, 14, 0.9));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.055),
    0 18px 48px rgba(0, 0, 0, 0.18),
    0 0 34px rgba(85, 231, 186, 0.08);
}

.generation-page #home-task-list {
  min-height: clamp(418px, 68dvh, 758px);
  padding: clamp(18px, 2.5vw, 30px);
}

.generation-page #home-task-list > .empty-state {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

#page-home .home-business-shortcuts button {
  --card-glow: 85, 231, 186;
  position: relative;
  isolation: isolate;
  min-height: 286px;
  overflow: hidden;
  border: 1px solid rgba(80, 224, 176, 0.19);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 6%, rgba(51, 199, 193, 0.11), transparent 28%),
    linear-gradient(145deg, rgba(5, 33, 29, 0.76), rgba(0, 13, 14, 0.9));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.075),
    inset 0 0 42px rgba(var(--card-glow), 0.06),
    0 18px 48px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(var(--card-glow), 0.055),
    0 0 42px rgba(var(--card-glow), 0.14);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

#page-home .home-quick-input-panel::before,
#page-home .home-business-shortcuts button::before,
#page-commercial-creation .commercial-composer::before,
#page-commercial-creation .commercial-progress-panel::before {
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(var(--card-glow), 0.82), transparent);
  box-shadow:
    0 0 14px rgba(var(--card-glow), 0.58),
    0 0 34px rgba(var(--card-glow), 0.3);
  content: "";
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

#page-home .home-quick-input-panel:focus-within::before,
#page-commercial-creation .commercial-composer:focus-within::before {
  opacity: 1;
  transform: scaleX(1.08);
  box-shadow:
    0 0 18px rgba(var(--card-glow), 0.76),
    0 0 46px rgba(var(--card-glow), 0.42);
}

/* Reuse the homepage workflow's restrained moving gradient on the commercial input frame. */
#page-commercial-creation .commercial-composer::before {
  right: 12px;
  left: 12px;
  background: linear-gradient(90deg, transparent 0%, rgba(87, 224, 179, 0.14) 10%, #63e0b3 30%, rgba(183, 247, 225, 0.82) 43%, #5bdfb5 58%, #46cf9f 74%, rgba(70, 207, 159, 0.14) 90%, transparent 100%);
  background-position: 100% 50%;
  background-size: 220% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 0 12px rgba(78, 215, 189, 0.18), 0 0 22px rgba(71, 210, 165, 0.06);
  opacity: 0.72;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.18) 4%, #000 12%, #000 88%, rgba(0, 0, 0, 0.18) 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.18) 4%, #000 12%, #000 88%, rgba(0, 0, 0, 0.18) 96%, transparent 100%);
  animation: workflow-gradient-stream 8s linear infinite;
  will-change: background-position;
}

#page-commercial-creation .commercial-composer:hover::before,
#page-commercial-creation .commercial-composer:focus-within::before {
  opacity: 0.9;
  transform: none;
  box-shadow: 0 0 14px rgba(78, 215, 189, 0.24), 0 0 26px rgba(71, 210, 165, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  #page-commercial-creation .commercial-composer::before { animation: none; }
}

#page-home .home-business-shortcuts button + button {
  --card-glow: 70, 205, 232;
  border-left: 1px solid rgba(80, 224, 176, 0.19);
}

#page-home .home-business-shortcuts button:hover {
  transform: translateY(-3px);
  border-color: rgba(85, 231, 186, 0.42);
  background:
    radial-gradient(circle at 92% 6%, rgba(51, 199, 193, 0.15), transparent 30%),
    linear-gradient(145deg, rgba(7, 40, 35, 0.82), rgba(0, 16, 16, 0.94));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 54px rgba(var(--card-glow), 0.1),
    0 28px 64px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(var(--card-glow), 0.14),
    0 0 56px rgba(var(--card-glow), 0.24);
}

#page-home .home-business-shortcuts button:hover::before {
  opacity: 1;
  transform: scaleX(1.08);
  box-shadow:
    0 0 18px rgba(var(--card-glow), 0.76),
    0 0 46px rgba(var(--card-glow), 0.42);
}

#page-home .home-business-entry-icon {
  --icon-primary: #68edc2;
  --icon-secondary: #31c9d5;
  position: relative;
  isolation: isolate;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--icon-primary) 42%, transparent);
  border-radius: 18px;
  color: var(--icon-primary);
  background:
    radial-gradient(circle at 76% 20%, color-mix(in srgb, var(--icon-secondary) 24%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(80, 224, 176, 0.14), rgba(5, 27, 29, 0.88));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 18px color-mix(in srgb, var(--icon-primary) 7%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#page-home .home-business-entry-icon--drama {
  --icon-primary: #55dcf0;
  --icon-secondary: #718cff;
  background:
    radial-gradient(circle at 76% 20%, rgba(113, 140, 255, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(45, 190, 210, 0.14), rgba(5, 24, 34, 0.9));
}

#page-home .home-business-entry-icon svg {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--icon-primary) 26%, transparent));
  stroke-width: 1.55;
  transition: transform 180ms ease, filter 180ms ease;
}

#page-home .home-business-icon-play {
  fill: color-mix(in srgb, var(--icon-primary) 18%, transparent);
}

#page-home .home-business-entry:hover .home-business-entry-icon,
#page-home .home-business-entry:focus-visible .home-business-entry-icon {
  transform: translateY(-2px) rotate(-1deg);
  border-color: color-mix(in srgb, var(--icon-primary) 70%, transparent);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 22px color-mix(in srgb, var(--icon-primary) 10%, transparent),
    0 14px 34px color-mix(in srgb, var(--icon-primary) 14%, rgba(0, 0, 0, 0.24));
}

#page-home .home-business-entry:hover .home-business-entry-icon svg,
#page-home .home-business-entry:focus-visible .home-business-entry-icon svg {
  transform: scale(1.07);
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--icon-primary) 42%, transparent));
}

@media (max-width: 760px) {
  .generation-page .generation-banner {
    min-height: 250px;
  }

  .generation-page .generation-banner-copy {
    padding-top: 64px;
  }

  .generation-back-link {
    top: 12px;
    left: 0;
    gap: 1px;
  }

  .generation-request-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generation-request-content {
    gap: 20px;
  }

  .generation-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .generation-page-actions {
    width: 100%;
  }

  .generation-page-actions .ghost-button {
    flex: 1 1 0;
  }

  #page-home .home-mode-selectors {
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-home .home-mode-button {
    min-width: 0;
    padding-inline: 12px;
  }

  #page-home .home-advanced-fields .workflow-structured-fields {
    grid-template-columns: 1fr;
  }

  #page-home .home-intent-area,
  #page-home .home-quick-input-panel:has(#home-advanced-fields:not([hidden])) .home-intent-area {
    min-height: 150px;
  }

  #page-home .home-intent-area #home-intent-input,
  #page-home .home-quick-input-panel:has(#home-advanced-fields:not([hidden])) .home-intent-area #home-intent-input {
    min-height: 150px;
    height: 150px;
  }

  #page-home .home-intent-inline-hint kbd {
    display: none;
  }

  #page-home .home-business-shortcuts {
    gap: 12px;
  }

  #page-home .home-business-shortcuts button + button {
    border-left: 1px solid rgba(80, 224, 176, 0.19);
  }
}

@media (prefers-reduced-motion: reduce) {
  #page-home .home-mode-selectors::before,
  #page-home .home-mode-selectors::after,
  #page-home .home-mode-button,
  #page-home .home-mode-button::before,
  #page-home .home-mode-button::after {
    transition-duration: 0.01ms;
  }
}
