/* Content-factory layout. Shared user navigation lives in user-shell.css. */

html.lingling-user-theme body.mode-user {
  --creator-red: var(--creator-brand-accent, #ee4d2d);
  --focus: var(--creator-brand-accent, #ee4d2d);
  --lingling-ink: var(--creator-brand-ink, #17231f);
  --lingling-muted: var(--creator-brand-muted, #68756f);
  --lingling-soft: var(--creator-brand-bg, #f3f6f4);
  --lingling-surface: var(--creator-brand-surface-muted, #fbfcfb);
  --lingling-line: var(--creator-brand-line, #dfe5e2);
  --lingling-line-strong: var(--creator-brand-line-strong, #c9d2ce);
  --lingling-red: var(--creator-brand-accent, #ee4d2d);
  --lingling-red-deep: var(--creator-brand-accent-strong, #d83d20);
  --lingling-red-soft: var(--creator-brand-accent-soft, #fff0eb);
  color: var(--lingling-ink);
  background: var(--lingling-soft);
  font-family: var(--creator-brand-font, "PingFang SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

html.lingling-user-theme body.mode-user .role-gate {
  display: none;
}

html.lingling-user-theme body.mode-user .creator-shell {
  color: var(--lingling-ink);
  background: var(--lingling-soft);
}

html.lingling-user-theme body.lingling-user-theme-fixture .creator-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

html.lingling-user-theme body.mode-user:not(.lingling-user-theme-fixture) .user-shell-header {
  grid-row: 1;
}

html.lingling-user-theme body.mode-user:not(.lingling-user-theme-fixture) .portal-announcement-banner {
  grid-row: 2;
}

html.lingling-user-theme body.mode-user:not(.lingling-user-theme-fixture) .creator-layout {
  grid-row: 3;
}

html.lingling-user-theme body.mode-user .portal-notification-unread,
html.lingling-user-theme body.mode-user .portal-task-progress span {
  background: var(--lingling-red);
}

html.lingling-user-theme body.mode-user .portal-task-progress {
  background: #f7ddd7;
}

html.lingling-user-theme body.mode-user .creator-layout {
  grid-template-columns: minmax(480px, 560px) minmax(0, 1fr);
  gap: clamp(42px, 4vw, 72px);
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 4.4vh, 52px) clamp(28px, 4vw, 64px) 0;
  background: transparent;
}

html.lingling-user-theme body.mode-user .creator-compose {
  align-content: start;
  gap: 22px;
  overflow-y: auto;
  border-right: 0;
  padding: 4px 0 72px;
  background: transparent;
  scrollbar-width: thin;
  animation: lingling-rise 420ms ease-out both;
}

html.lingling-user-theme body.mode-user .creator-heading {
  display: grid;
  gap: 9px;
}

html.lingling-user-theme body.mode-user .creator-heading h2 {
  max-width: 520px;
  margin: 0;
  color: var(--lingling-ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0;
}

html.lingling-user-theme body.mode-user .creator-form {
  max-width: 540px;
  gap: 22px;
}

html.lingling-user-theme body.mode-user .creator-form label {
  display: grid;
  gap: 9px;
  color: #35433d;
  font-size: 13px;
  font-weight: 700;
}

html.lingling-user-theme body.mode-user .creator-form select,
html.lingling-user-theme body.mode-user .creator-form textarea {
  border-color: var(--lingling-line-strong);
  border-radius: 8px;
  color: var(--lingling-ink);
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

html.lingling-user-theme body.mode-user .creator-form select {
  min-height: 54px;
  padding-right: 38px;
}

html.lingling-user-theme body.mode-user #portalInput {
  min-height: 152px;
  padding: 15px 16px;
  line-height: 1.7;
}

html.lingling-user-theme body.mode-user #portalInput.is-multiline {
  min-height: 220px;
}

html.lingling-user-theme body.mode-user .creator-form select:hover,
html.lingling-user-theme body.mode-user .creator-form textarea:hover {
  border-color: #aab6b0;
  background: #ffffff;
}

html.lingling-user-theme body.mode-user .creator-form select:focus,
html.lingling-user-theme body.mode-user .creator-form textarea:focus {
  border-color: var(--lingling-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.12);
}

html.lingling-user-theme body.mode-user .creator-submit-row {
  grid-template-columns: minmax(190px, 1.25fr) minmax(144px, 0.75fr);
  gap: 12px;
}

html.lingling-user-theme body.mode-user .creator-primary,
html.lingling-user-theme body.mode-user .creator-submit-row .secondary-button {
  min-height: 54px;
  border-radius: 8px;
}

html.lingling-user-theme body.mode-user .creator-primary {
  background: var(--lingling-red);
  box-shadow: 0 10px 22px rgba(216, 61, 32, 0.16);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

html.lingling-user-theme body.mode-user .creator-primary:hover {
  background: var(--lingling-red-deep);
  box-shadow: 0 13px 26px rgba(216, 61, 32, 0.22);
  transform: translateY(-1px);
}

html.lingling-user-theme body.mode-user .creator-primary:disabled {
  background: #cbd2ce;
  box-shadow: none;
  transform: none;
}

html.lingling-user-theme body.mode-user .creator-submit-row .secondary-button {
  border-color: var(--lingling-line-strong);
  color: #42504a;
  background: rgba(255, 255, 255, 0.62);
}

html.lingling-user-theme body.mode-user .creator-submit-row .secondary-button:hover {
  border-color: #a8b4ae;
  color: var(--lingling-ink);
  background: #ffffff;
}

html.lingling-user-theme body.mode-user .creator-preview {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid var(--lingling-line);
  padding: 0 0 52px clamp(34px, 3.5vw, 58px);
  background: transparent;
  animation: lingling-rise 460ms 80ms ease-out both;
}

html.lingling-user-theme body.mode-user .portal-tabs {
  gap: clamp(18px, 2vw, 30px);
  border-bottom-color: var(--lingling-line);
}

html.lingling-user-theme body.mode-user .portal-tabs button {
  min-height: 44px;
  border-bottom-width: 2px;
  color: #7a8580;
  font-size: 13px;
  transition: color 150ms ease, border-color 150ms ease;
}

html.lingling-user-theme body.mode-user .portal-tabs button:hover {
  color: var(--lingling-ink);
}

html.lingling-user-theme body.mode-user .portal-tabs button.is-active {
  border-bottom-color: var(--lingling-red);
  color: var(--lingling-ink);
}

html.lingling-user-theme body.mode-user .portal-tab-panel {
  margin-top: 0;
  padding-top: 24px;
  scrollbar-width: thin;
}

html.lingling-user-theme body.mode-user .creator-preview-head {
  min-height: 32px;
}

html.lingling-user-theme body.mode-user .creator-preview-head strong {
  color: var(--lingling-ink);
  font-size: 19px;
  line-height: 1.4;
}

html.lingling-user-theme body.mode-user .creator-mockup {
  grid-template-columns: minmax(290px, 1.14fr) minmax(210px, 0.72fr);
  gap: clamp(22px, 2.5vw, 38px);
  margin-top: 20px;
}

html.lingling-user-theme body.mode-user .creator-mockup:not(:has(.creator-effect-reference)) {
  grid-template-columns: minmax(290px, 640px);
}

html.lingling-user-theme body.mode-user .creator-live-preview-head,
html.lingling-user-theme body.mode-user .creator-effect-reference-head {
  min-height: 45px;
  border-bottom: 1px solid var(--lingling-line);
  padding-bottom: 10px;
}

html.lingling-user-theme body.mode-user .creator-live-preview-head strong,
html.lingling-user-theme body.mode-user .creator-effect-reference-head strong {
  color: var(--lingling-ink);
  font-size: 15px;
}

html.lingling-user-theme body.mode-user .creator-live-preview-head span,
html.lingling-user-theme body.mode-user .creator-effect-reference-head span {
  color: var(--lingling-muted);
}

html.lingling-user-theme body.mode-user .creator-sample-image {
  max-height: min(67vh, 680px);
  border-color: var(--lingling-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(26, 40, 34, 0.09);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

html.lingling-user-theme body.mode-user .creator-sample-image:hover {
  border-color: #b9c3be;
  box-shadow: 0 22px 54px rgba(26, 40, 34, 0.14);
  transform: translateY(-2px);
}

html.lingling-user-theme body.mode-user .creator-sample-image img {
  max-height: min(67vh, 680px);
}

html.lingling-user-theme body.mode-user .portal-result,
html.lingling-user-theme body.mode-user .portal-history-frame,
html.lingling-user-theme body.mode-user .portal-history-empty {
  border-color: var(--lingling-line);
}

html.lingling-user-theme body.mode-user .portal-history-empty {
  color: var(--lingling-muted);
  background: rgba(255, 255, 255, 0.58);
}

html.lingling-user-theme body.mode-user .portal-announcement-banner {
  border-bottom-color: #f1c7bd;
  background: #fff7f4;
}

@keyframes lingling-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (max-width: 1380px) {
  html.lingling-user-theme body.mode-user .creator-layout {
    grid-template-columns: minmax(420px, 0.88fr) minmax(0, 1.12fr);
    gap: 36px;
    padding-right: 36px;
    padding-left: 36px;
  }

  html.lingling-user-theme body.mode-user .creator-heading h2 {
    font-size: 28px;
  }

  html.lingling-user-theme body.mode-user .creator-preview {
    padding-left: 36px;
  }

  html.lingling-user-theme body.mode-user .creator-mockup {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  html.lingling-user-theme body.mode-user .creator-sample-image {
    width: min(460px, 100%);
  }

}

@media (max-width: 1180px) {

  html.lingling-user-theme body.mode-user .creator-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: max-content;
    gap: 0;
    width: 100%;
    overflow-y: auto;
    padding: 32px clamp(24px, 6vw, 54px) 72px;
  }

  html.lingling-user-theme body.mode-user .creator-compose {
    overflow: visible;
    padding: 0 0 42px;
  }

  html.lingling-user-theme body.mode-user .creator-form {
    max-width: 680px;
  }

  html.lingling-user-theme body.mode-user .creator-preview {
    overflow: visible;
    border-top: 1px solid var(--lingling-line);
    border-left: 0;
    padding: 24px 0 0;
  }

  html.lingling-user-theme body.mode-user .portal-tab-panel {
    overflow: visible;
  }

  html.lingling-user-theme body.mode-user .creator-mockup {
    grid-template-columns: minmax(280px, 0.9fr) minmax(220px, 0.7fr);
  }

  html.lingling-user-theme body.mode-user .creator-sample-image {
    width: 100%;
  }
}

@media (max-width: 720px) {

  html.lingling-user-theme body.mode-user .creator-layout {
    padding: 26px 18px 56px;
  }


  html.lingling-user-theme body.mode-user .creator-compose {
    gap: 24px;
    padding-bottom: 34px;
  }

  html.lingling-user-theme body.mode-user .creator-heading {
    gap: 7px;
  }

  html.lingling-user-theme body.mode-user .creator-heading h2 {
    font-size: 24px;
    line-height: 1.25;
  }

  html.lingling-user-theme body.mode-user .creator-form {
    gap: 17px;
  }

  html.lingling-user-theme body.mode-user #portalInput {
    min-height: 132px;
  }

  html.lingling-user-theme body.mode-user #portalInput.is-multiline {
    min-height: 180px;
  }

  html.lingling-user-theme body.mode-user .creator-submit-row {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 9px;
  }

  html.lingling-user-theme body.mode-user .portal-tabs {
    gap: 0;
  }

  html.lingling-user-theme body.mode-user .portal-tabs button {
    min-width: 0;
    font-size: 12px;
  }

  html.lingling-user-theme body.mode-user .portal-tab-panel {
    padding-top: 20px;
  }

  html.lingling-user-theme body.mode-user .creator-preview-head strong {
    font-size: 17px;
  }

  html.lingling-user-theme body.mode-user .creator-mockup {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 16px;
  }

}


@media (prefers-reduced-motion: reduce) {
  html.lingling-user-theme body.mode-user .creator-compose,
  html.lingling-user-theme body.mode-user .creator-preview {
    animation: none;
  }

  html.lingling-user-theme body.mode-user .creator-form select,
  html.lingling-user-theme body.mode-user .creator-form textarea,
  html.lingling-user-theme body.mode-user .creator-primary,
  html.lingling-user-theme body.mode-user .creator-sample-image,
  html.lingling-user-theme body.mode-user .portal-tabs button {
    transition: none;
  }

}
