:root {
  --bg: #f6f2fa;
  --bg-2: #fcfbfe;
  --card: rgba(255, 253, 255, 0.9);
  --card-solid: #ffffff;
  --text: #1d1730;
  --muted: #6f677f;
  --line: #e2d8ee;
  --line-strong: #cfbfdc;
  --strong: #745d90;
  --strong-deep: #49385f;
  --strong-soft: #f4eef8;
  --tag-bg: #f1ebf7;
  --shadow: 0 24px 60px rgba(61, 46, 82, 0.09);
  --shadow-soft: 0 12px 28px rgba(61, 46, 82, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.96) 0%, transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(146, 132, 174, 0.12) 0%, transparent 30%),
    radial-gradient(circle at 78% 82%, rgba(121, 103, 160, 0.1) 0%, transparent 26%),
    linear-gradient(160deg, var(--bg) 0%, #f5f0f9 48%, var(--bg-2) 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 42px 18px 72px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 245, 250, 0.95) 58%, rgba(239, 235, 245, 0.96) 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: riseIn 0.7s ease both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.55) 0%, transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(141, 127, 166, 0.14) 0%, transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -46px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 93, 144, 0.16) 0%, rgba(116, 93, 144, 0.04) 45%, transparent 72%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0 0 8px;
  color: var(--strong);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: 880px;
  color: #4d4460;
  font-size: clamp(17px, 2.6vw, 23px);
  line-height: 1.45;
  font-weight: 650;
}

.card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.55) 0%, transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(141, 127, 166, 0.14) 0%, transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.form-card {
  animation: riseIn 0.8s ease both;
}

.form-note {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(116, 93, 144, 0.22);
  background: linear-gradient(180deg, #fbf8fd 0%, #f5f1f8 100%);
}

.form-note h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.form-note p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.field {
  margin-bottom: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #514260;
  font-size: 14px;
  font-weight: 650;
}

textarea,
input,
select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #d7cfdf;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  border-color: #9986ae;
  box-shadow: 0 0 0 4px rgba(116, 93, 144, 0.12);
  outline: none;
}

button {
  width: 100%;
  border: none;
  border-radius: 15px;
  padding: 14px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #8a789e 0%, #6d5b83 100%);
  box-shadow: 0 16px 32px rgba(77, 62, 96, 0.2);
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(77, 62, 96, 0.24);
}

button:disabled {
  opacity: 0.76;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status {
  margin: 12px 0 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status[data-state="loading"] {
  color: #745d90;
}

.status[data-state="success"] {
  color: #5b4a6e;
}

.status[data-state="error"] {
  color: #b42318;
}

.generation-progress {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #ddd4e8;
  background: linear-gradient(180deg, #fbf8fd 0%, #f4eef9 100%);
}

.progress-meta {
  display: block;
  margin-bottom: 8px;
  color: #5d5271;
  font-size: 12px;
  line-height: 1.4;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7deef;
  box-shadow: inset 0 1px 2px rgba(77, 62, 96, 0.1);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b8aaf 0%, #7d6a96 55%, #6a587f 100%);
  transition: width 0.24s linear;
}

.progress-track.is-indeterminate .progress-fill {
  width: 34% !important;
  animation: progressIndeterminate 1.2s ease-in-out infinite;
  will-change: transform;
}

.progress-track:not(.is-indeterminate) .progress-fill {
  animation: none;
}

@keyframes progressIndeterminate {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(320%);
  }
}

.hidden {
  display: none;
}

.result {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.asset-card,
.opportunities-card,
.risk-card,
.insights-card,
.blueprint-card,
.spotlight-card {
  grid-column: span 12;
}

.section-head {
  margin-bottom: 14px;
}

.section-label {
  margin: 0 0 4px;
  color: var(--strong);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.asset-summary {
  margin: 0;
  color: #433c50;
  line-height: 1.75;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #ded6e6;
  background: var(--tag-bg);
  color: #584a6a;
  font-size: 13px;
  font-weight: 650;
  padding: 6px 11px;
}

.tag.muted,
.muted {
  color: #6f7d81;
}

.insight-board {
  display: grid;
  gap: 16px;
}

.comparison-wrap {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e3d3f6;
  box-shadow: var(--shadow-soft);
}

.comparison-table thead th {
  padding: 14px 16px;
  background: linear-gradient(135deg, #7b6d8f 0%, #635173 100%);
  color: #ffffff;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.comparison-table tbody th,
.comparison-table tbody td {
  padding: 15px 16px;
  border-top: 1px solid #eadcf8;
  vertical-align: top;
  color: #392656;
  line-height: 1.7;
  font-size: 14px;
}

.comparison-table tbody th {
  width: 16%;
  color: #5f506f;
  background: #faf8fc;
  font-weight: 800;
}

.chart-caption {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.traffic-chart-shell {
  position: relative;
  min-height: 360px;
  border-radius: 20px;
  border: 1px solid #e4ddea;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 241, 255, 0.92) 100%);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.traffic-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(116, 93, 144, 0.06) 1px, transparent 1px),
    linear-gradient(to top, rgba(116, 93, 144, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
}

.traffic-axis {
  position: absolute;
  z-index: 2;
  color: #6b5b79;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.traffic-axis-x {
  right: 16px;
  bottom: 12px;
}

.traffic-axis-y {
  left: 14px;
  top: 14px;
}

.traffic-chart {
  position: relative;
  z-index: 3;
  min-height: 360px;
}

.traffic-node {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 290px;
  transform: translate(-12px, -12px);
}

.traffic-node-dot {
  width: var(--node-size, 34px);
  height: var(--node-size, 34px);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 14px 26px rgba(77, 62, 96, 0.18);
  border: 4px solid rgba(255, 255, 255, 0.78);
}

.traffic-node-copy {
  padding: 12px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(199, 188, 208, 0.8);
  box-shadow: 0 10px 20px rgba(77, 62, 96, 0.06);
}

.traffic-node-copy strong {
  display: block;
  margin-bottom: 5px;
  color: #4a405d;
  font-size: 13px;
}

.traffic-node-copy p {
  margin: 0;
  color: #645c71;
  line-height: 1.55;
  font-size: 12px;
}

.traffic-node.tone-one .traffic-node-dot {
  background: linear-gradient(135deg, #9a8fb3 0%, #78688d 100%);
}

.traffic-node.tone-two .traffic-node-dot {
  background: linear-gradient(135deg, #b0a6c1 0%, #8d7ca4 100%);
}

.traffic-node.tone-three .traffic-node-dot {
  background: linear-gradient(135deg, #8e7fa7 0%, #665a7f 100%);
}

.opportunity-list,
.plan-list {
  display: grid;
  gap: 12px;
}

.opportunity-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e4ddea;
  background: linear-gradient(180deg, #ffffff 0%, #fbfafc 100%);
  box-shadow: 0 10px 20px rgba(77, 62, 96, 0.05);
}

.opportunity-head {
  margin-bottom: 10px;
}

.rank {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eee9f4;
  color: #615770;
  font-size: 12px;
  font-weight: 800;
}

.opportunity-item h3,
.plan-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
}

.opportunity-item p,
.plan-item p {
  margin: 8px 0 0;
  color: #544c60;
  line-height: 1.68;
  font-size: 14px;
}

.item-label {
  display: block;
  margin-bottom: 3px;
  color: #7b7289;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.opp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.opp-grid-item {
  padding: 12px 13px;
  border-radius: 14px;
  background: #faf8fb;
  border: 1px solid #e8e1eb;
}

.opp-grid-item strong {
  display: block;
  color: #4e4560;
  line-height: 1.62;
  font-size: 13px;
}

.opp-bottom {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ece5ef;
}

.opp-bottom-item {
  flex: 1;
}

.plan-item {
  position: relative;
  padding: 15px;
  border-radius: 18px;
  border: 1px solid #e4dde8;
  background: linear-gradient(180deg, #ffffff 0%, #fbfafc 100%);
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.plan-index {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8f8198 0%, #6f6278 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.plan-phase {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f0ebf4;
  color: #6c5f7b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-item h3 {
  margin-top: 0;
}

.plan-learning {
  padding-top: 10px;
}

.tone-hypothesis {
  box-shadow: inset 4px 0 0 #8b7c97, 0 10px 20px rgba(77, 62, 96, 0.05);
}

.tone-feedback {
  box-shadow: inset 4px 0 0 #a093ac, 0 10px 20px rgba(77, 62, 96, 0.05);
}

.tone-iterate {
  box-shadow: inset 4px 0 0 #8c7e9f, 0 10px 20px rgba(77, 62, 96, 0.05);
}

.tone-consolidate {
  box-shadow: inset 4px 0 0 #6a5b78, 0 10px 20px rgba(77, 62, 96, 0.05);
}

.blueprint-card {
  border-color: #e1d9e8;
  background: linear-gradient(145deg, rgba(251, 248, 253, 0.98) 0%, rgba(255, 255, 255, 0.98) 70%);
}

.blueprint-content {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #e5dfeb;
  background: linear-gradient(180deg, #ffffff 0%, #fbfafc 100%);
  box-shadow: var(--shadow-soft);
}

.bp-title-wrap {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #e2dbea;
}

.bp-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8f8198 0%, #6f6278 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.bp-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.bp-details {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.bp-row {
  color: #4e3a72;
  font-size: 14px;
  line-height: 1.7;
}

.bp-row strong {
  color: var(--strong-deep);
}

.bp-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bp-meta-card {
  padding: 14px 14px 13px;
  border-radius: 16px;
  border: 1px solid #e5deea;
  background: linear-gradient(180deg, #fcfbfd 0%, #f6f2f8 100%);
}

.bp-meta-card span {
  display: block;
  margin-bottom: 6px;
  color: #7a7088;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}

.bp-meta-card strong {
  display: block;
  color: #4b4358;
  line-height: 1.62;
  font-size: 13px;
}

.bp-meta-card-wide {
  grid-column: span 3;
}

.bp-structure {
  padding: 14px;
  border-radius: 14px;
  background: #f8f6fa;
}

.bp-structure h4 {
  margin: 0 0 10px;
  color: #50445e;
  font-size: 14px;
}

.bp-structure ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.bp-direct {
  margin: 0;
  white-space: pre-wrap;
  color: #4a4455;
  line-height: 1.78;
  font-size: 15px;
}

.bp-structure li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #544c60;
  line-height: 1.6;
  font-size: 14px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ece0ff;
  color: #5f3197;
  font-size: 12px;
  font-weight: 800;
}

.field-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.field-title-row label {
  margin-bottom: 0;
}

.voice-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #5e5570;
  border: 1px solid #ddd4e6;
  box-shadow: 0 8px 18px rgba(77, 62, 96, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.title-voice-btn {
  margin-top: -2px;
}

.voice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(77, 62, 96, 0.1);
}

.voice-btn.is-recording {
  background: linear-gradient(135deg, #7f718d 0%, #5f546b 100%);
  color: #ffffff;
}

.voice-btn.is-disabled {
  opacity: 0.45;
}

.voice-icon {
  position: relative;
  display: inline-block;
  width: 11px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.voice-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 2px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
}

.voice-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -9px;
  width: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.week-timeline {
  display: grid;
  gap: 16px;
}

.week-axis {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 10px;
  padding: 12px 0 2px;
  overflow-x: auto;
}

.week-axis-line {
  position: absolute;
  top: 17px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: linear-gradient(90deg, rgba(116, 93, 144, 0.2) 0%, rgba(116, 93, 144, 0.45) 45%, rgba(116, 93, 144, 0.2) 100%);
}

.week-point {
  min-width: 92px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 6px;
  z-index: 1;
}

.week-point-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #837094;
  box-shadow: 0 0 0 5px rgba(131, 112, 148, 0.16);
}

.week-point-day {
  color: #6f5f83;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.week-point strong {
  color: #4e435f;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.week-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.week-detail-card {
  border-radius: 16px;
  border: 1px solid #e4dde8;
  background: linear-gradient(180deg, #ffffff 0%, #fbfafc 100%);
  padding: 13px;
  box-shadow: 0 8px 16px rgba(77, 62, 96, 0.05);
}

.week-detail-card h3 {
  margin: 0 0 8px;
  color: #4f475f;
  font-size: 15px;
  line-height: 1.4;
}

.week-detail-card p {
  margin: 8px 0 0;
  color: #575062;
  line-height: 1.66;
  font-size: 13px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 920px) {
  .blueprint-card {
    grid-column: span 7;
  }

  .spotlight-card {
    grid-column: span 5;
  }

  .opportunities-card,
  .asset-card,
  .insights-card {
    grid-column: span 12;
  }
}

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

  .opp-bottom {
    flex-direction: column;
  }

  .bp-meta-grid {
    grid-template-columns: 1fr;
  }

  .bp-meta-card-wide {
    grid-column: auto;
  }

  .comparison-table {
    min-width: 560px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 24px 14px 42px;
  }

  .hero,
  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .bp-title {
    font-size: 20px;
  }

  .traffic-chart-shell {
    min-height: 420px;
  }

  .traffic-node {
    max-width: 220px;
  }

  .traffic-node-copy {
    padding: 10px 11px;
  }

  .opp-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    min-width: 520px;
  }

  .week-axis {
    grid-template-columns: repeat(7, minmax(84px, 1fr));
  }

  .week-details {
    grid-template-columns: 1fr;
  }
}
