:root {
  --bg: #f5f0e8;
  --card: #fffdf8;
  --ink: #1f1a17;
  --muted: #7a6f64;
  --line: #eadfce;
  --accent: #d76c2d;
  --accent-soft: #ffe6d5;
  --accent-deep: #8e3f16;
  --ok: #197a4a;
  --warn: #a85f19;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top left, #fff6ed 0, rgba(255, 246, 237, 0) 32%),
    linear-gradient(180deg, #f7f2eb 0%, var(--bg) 100%);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.phone-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.landing-shell,
.form-shell,
.submissions-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-card,
.section-card,
.runtime-card,
.submission-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(73, 44, 26, 0.08);
}

.hero-card,
.runtime-card,
.section-card {
  padding: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.data-center-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(215, 108, 45, 0.18);
}

.data-center-entry:active {
  transform: translateY(1px);
}

.hero-copy,
.section-title span,
.empty-hint,
.field span,
.submission-card p,
.runtime-list li {
  color: var(--muted);
}

.entry-grid {
  display: grid;
  gap: 14px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff7ef 0%, #ffffff 100%);
  border: 1px solid #f0d7c2;
  min-height: 148px;
}

.warm-card {
  background: linear-gradient(135deg, #fff0e5 0%, #fffdf8 100%);
}

.entry-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.runtime-head,
.submission-row,
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.runtime-head button,
.submit-btn,
.secondary-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.runtime-head button {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
}

.runtime-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.recent-list,
.list-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submission-card {
  padding: 16px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}

.page-head {
  padding: 4px 4px 2px;
}

.back-link {
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 700;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.required-card {
  border-color: #f1c9af;
}

.required-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1f0;
  border: 1px solid #f3c0bc;
  color: #b42318;
  font-size: 14px;
  line-height: 1.5;
}

.upload-wrap {
  margin-bottom: 14px;
}

.compact-title {
  margin-bottom: 12px;
}

.upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.upload-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  overflow: hidden;
}

.secondary-action {
  background: #fff3ea;
  color: var(--accent-deep);
  border: 1px solid #f0d7c2;
}

.upload-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-hint,
.upload-file-name {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.text-template-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid #f0d7c2;
  border-radius: 16px;
  background: #fff8f1;
}

.text-template-preview {
  margin: 0;
  min-height: 90px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  font: 14px/1.55 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.upload-file-name {
  color: var(--accent-deep);
  font-weight: 700;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.field input,
.field textarea,
.excel-upload-action {
  width: 100%;
}

.field input,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.hidden {
  display: none !important;
}

.clipboard-bridge {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.error-text {
  color: #b42318;
}

.excel-shell {
  gap: 18px;
}

.excel-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.excel-upload-action {
  min-height: 60px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.submit-btn,
.secondary-btn {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
}

.submit-btn {
  background: var(--accent);
  color: #fff;
}

.secondary-btn {
  background: #fff3ea;
  color: var(--accent-deep);
  border: 1px solid #f0d7c2;
}

.summary-meta {
  color: var(--muted);
  font-size: 13px;
}

.assistant-card {
  position: sticky;
  top: 12px;
  z-index: 5;
  background: linear-gradient(135deg, rgba(255, 248, 240, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  backdrop-filter: blur(10px);
}

.assistant-head {
  align-items: flex-start;
}

.assistant-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.assistant-preview {
  margin-top: 16px;
}

.assistant-preview-card {
  padding: 16px;
  border-radius: 18px;
  background: #fff8f1;
  border: 1px solid #f0d7c2;
}

.assistant-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.assistant-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #f0d7c2;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.assistant-copy-text {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.assistant-tip {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sheet-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sheet-pill {
  min-width: 132px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
  border: 1px solid #f0d7c2;
}

.sheet-pill strong,
.sheet-pill span {
  display: block;
}

.sheet-pill span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.wechat-result-card {
  padding: 18px;
}

.wechat-result-card.active-card {
  border-color: #d76c2d;
  box-shadow: 0 16px 34px rgba(215, 108, 45, 0.18);
}

.message-preview {
  margin-top: 10px;
}

.message-preview-label {
  margin-bottom: 8px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.message-preview-bubble {
  padding: 16px 18px;
  border-radius: 18px;
  background: #95ec69;
  color: #121212;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: 0 10px 24px rgba(58, 126, 36, 0.15);
}

.result-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.result-head h2 {
  font-size: 18px;
}

.result-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.compact-actions {
  justify-content: flex-end;
}

.compact-actions .submit-btn,
.compact-actions .secondary-btn {
  padding: 10px 14px;
}

.image-section {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.image-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-section-head h3 {
  margin: 0;
  font-size: 16px;
}

.image-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.image-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.image-asset-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #f0d7c2;
  background: linear-gradient(180deg, #fffdf9 0%, #fff5eb 100%);
  box-shadow: 0 10px 22px rgba(77, 45, 21, 0.08);
}

.image-asset-preview {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f4eee6;
}

.image-asset-body {
  padding: 12px;
}

.image-asset-body strong {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.image-action-row .secondary-btn {
  flex: 1;
  min-width: 0;
}

.wechat-shot {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    radial-gradient(circle at 20% 78%, rgba(246, 186, 86, 0.92) 0 8%, transparent 8.4%),
    radial-gradient(circle at 28% 76%, rgba(98, 62, 29, 0.95) 0 4.5%, transparent 4.7%),
    radial-gradient(circle at 20% 76%, rgba(241, 222, 182, 0.94) 0 14%, transparent 14.2%),
    radial-gradient(circle at 80% 78%, rgba(234, 195, 83, 0.94) 0 9%, transparent 9.2%),
    radial-gradient(circle at 69% 73%, rgba(255, 255, 255, 0.96) 0 6%, transparent 6.2%),
    radial-gradient(circle at 12% 28%, rgba(255, 255, 255, 0.92) 0 4%, transparent 4.3%),
    radial-gradient(circle at 82% 34%, rgba(255, 255, 255, 0.92) 0 4%, transparent 4.3%),
    linear-gradient(180deg, #d7f6ff 0%, #bdebf4 44%, #b3e4ef 100%);
  box-shadow: 0 18px 42px rgba(55, 118, 138, 0.18);
}

.wechat-topbar,
.wechat-header,
.wechat-footer {
  display: flex;
  align-items: center;
}

.wechat-topbar {
  justify-content: space-between;
  padding: 14px 18px 10px;
  background: rgba(248, 252, 253, 0.94);
}

.wechat-clock {
  font-size: 17px;
  font-weight: 700;
}

.wechat-island {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #121212;
  color: #fff0a2;
  font-size: 13px;
  font-weight: 700;
}

.wechat-island span {
  color: #ffd86b;
}

.wechat-header {
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(248, 252, 253, 0.94);
  border-bottom: 1px solid rgba(105, 141, 152, 0.14);
}

.wechat-header strong {
  flex: 1;
  text-align: center;
  font-size: 17px;
}

.wechat-back,
.wechat-menu {
  width: 28px;
  text-align: center;
  color: #394650;
  font-size: 22px;
  line-height: 1;
}

.wechat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 720px;
  padding: 18px 14px 24px;
}

.wechat-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.wechat-row.outgoing {
  justify-content: flex-end;
}

.wechat-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #413126 0%, #8c6657 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(65, 49, 38, 0.18);
}

.ghost-avatar {
  opacity: 0;
  pointer-events: none;
}

.wechat-bubble {
  max-width: calc(100% - 52px);
  padding: 16px 18px;
  border-radius: 18px;
  background: #95ec69;
  color: #121212;
  font-size: 16px;
  line-height: 1.55;
  box-shadow: 0 10px 24px rgba(58, 126, 36, 0.2);
  white-space: pre-wrap;
}

.wechat-image-bubble {
  width: min(100%, 350px);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(47, 87, 102, 0.18);
}

.wechat-image-bubble img {
  display: block;
  width: 100%;
  height: auto;
}

.wechat-empty-image {
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}

.wechat-footer {
  gap: 12px;
  padding: 14px 16px 18px;
  background: rgba(248, 252, 253, 0.96);
}

.wechat-footer-icon {
  font-size: 20px;
  color: #202020;
}

.wechat-input-bar {
  flex: 1;
  height: 38px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(60, 78, 88, 0.1);
}

.wechat-meta-block {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wechat-meta-block p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .assistant-card {
    top: 8px;
  }

  .wechat-shot {
    border-radius: 22px;
  }

  .wechat-body {
    min-height: 620px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .wechat-bubble {
    font-size: 15px;
  }

  .assistant-copy-text {
    font-size: 15px;
  }

  .message-preview-bubble {
    font-size: 15px;
  }

  .image-asset-grid {
    grid-template-columns: 1fr;
  }
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  background: #fff;
}

.deadline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.field .field-error {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.field.field-is-error .deadline-control input,
.field.field-is-error .deadline-control select {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.field textarea {
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}

.submit-message {
  min-height: 24px;
  text-align: center;
  color: var(--muted);
}

.submit-message.success {
  color: var(--ok);
}

.submit-message.error {
  color: #b13232;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hidden {
  display: none;
}

.recognition-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.secondary-btn {
  padding: 12px 18px;
  background: #fff3ea;
  color: var(--accent-deep);
  border: 1px solid #f0d7c2;
  font-weight: 700;
}

.secondary-btn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.recognition-status {
  color: var(--muted);
  font-size: 13px;
}

.recognition-status.waiting {
  color: var(--warn);
}

.recognition-status.success {
  color: var(--ok);
}

.recognition-status.error {
  color: #b13232;
}

@media (min-width: 720px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .hero-top {
    align-items: stretch;
    flex-direction: column;
  }

  .data-center-entry {
    width: 100%;
  }
}
