:root {
  --bg: #fbf8ff;
  --card: #ffffff;
  --ink: #1f1b2d;
  --muted: #756f83;
  --line: #eadff8;
  --main: #8b5cf6;
  --main-dark: #6d42df;
  --main-soft: #f1e9ff;
  --danger: #d94f70;
  --danger-soft: #fff0f3;
  --shadow: 0 18px 50px rgba(78, 48, 120, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, #efe5ff 0, transparent 28%),
    radial-gradient(circle at 92% 0%, #ffe8f1 0, transparent 26%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-weight: 400;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero,
.page {
  margin: 0 auto;
  max-width: 1280px;
  padding-left: 28px;
  padding-right: 28px;
}

.hero {
  padding-top: 18px;
}

nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

nav strong {
  color: var(--main-dark);
  font-size: 20px;
  font-weight: 800;
}

nav span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
}

.hero-simple {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 240, 255, 0.94)),
    radial-gradient(circle at 86% 20%, rgba(139, 92, 246, 0.16), transparent 30%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  padding: 32px 36px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  max-width: 720px;
}

.hero-actions,
.actions {
  display: flex;
  gap: 10px;
}

.hero-actions a,
.hero-actions button,
.primary,
.ghost {
  border-radius: 999px;
  font-weight: 700;
  padding: 12px 20px;
  text-decoration: none;
}

.hero-actions a,
.primary {
  background: var(--main);
  border: 0;
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.2);
  color: #fff;
}

.hero-actions button,
.ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost:disabled {
  color: #b9afc9;
  cursor: not-allowed;
  opacity: 0.65;
}

.page {
  display: grid;
  gap: 24px;
  padding-bottom: 56px;
}

.layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.sticky {
  position: sticky;
  top: 18px;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 0;
}

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

.compact {
  margin-bottom: 12px;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 16px;
  font-weight: 700;
  gap: 8px;
}

input,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  font-size: 16px;
  outline: 0;
  padding: 14px 15px;
  width: 100%;
}

textarea {
  line-height: 1.6;
  min-height: 160px;
  resize: vertical;
}

.quick-grid,
.form-grid {
  display: grid;
  gap: 12px;
}

.quick-grid {
  grid-template-columns: 0.7fr 1.4fr 0.8fr;
  margin-bottom: 14px;
}

.field-tip {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0 14px;
}

.form-grid {
  margin-top: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.preference-box {
  background: #fdfbff;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-top: 14px;
  padding: 15px;
}

.preference-box h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.preference-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
}

.pref {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 10px;
}

.pref.active {
  background: var(--main-soft);
  border-color: #d5c4ff;
  color: var(--main-dark);
}

#prefTip,
.hint,
.empty {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 10px 0 0;
}

.actions {
  margin-top: 16px;
}

.action-tip {
  background: var(--main-soft);
  border: 1px solid #d5c4ff;
  border-radius: 14px;
  color: var(--main-dark);
  display: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 12px 0 0;
  padding: 10px 12px;
}

.action-tip.show {
  display: block;
}

.full {
  margin-top: 14px;
  width: 100%;
}

.added-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
}

.added-item {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 14px;
}

.added-main {
  min-width: 0;
}

.added-item strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.added-item span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.added-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.edit-added,
.remove-added {
  background: var(--danger-soft);
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
}

.edit-added {
  background: var(--main-soft);
  color: var(--main-dark);
}

.remove-added {
  color: var(--danger);
}

.summary {
  background: #fdfbff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 14px;
}

.results {
  display: grid;
  gap: 18px;
}

.decision-card {
  background:
    linear-gradient(135deg, #ffffff, #f8f3ff);
  border: 1px solid var(--line);
  border-radius: 22px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 18px;
}

.decision-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0;
}

.decision-card p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.decision-label {
  background: var(--main);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.decision-label.muted {
  background: #f3edf8;
  color: #7b7286;
}

.comparison-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}

.comparison-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.comparison-title h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.comparison-title p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.comparison-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

.comparison-actions span {
  background: var(--main-soft);
  border-radius: 999px;
  color: var(--main-dark);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}

.mini-toggle {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}

.comparison-table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-height: 420px;
  overflow: auto;
}

.comparison-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  min-width: 1180px;
  width: 100%;
}

.comparison-panel.compact-view .comparison-table {
  min-width: 780px;
}

.comparison-panel.compact-view .detail-col {
  display: none;
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  background: #fbf8ff;
  color: var(--muted);
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.comparison-table tbody tr {
  cursor: pointer;
}

.comparison-table tbody tr:hover,
.comparison-table tbody tr.active {
  background: var(--main-soft);
}

.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.house-cell {
  color: var(--ink);
  font-weight: 800;
  min-width: 130px;
}

.long-cell {
  line-height: 1.55;
  min-width: 190px;
  max-width: 260px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.risk-low {
  background: #e8f8ef;
  color: #18794e;
}

.risk-medium {
  background: #fff3df;
  color: #a15c07;
}

.risk-high,
.tag-check {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag-best {
  background: var(--main-soft);
  color: var(--main-dark);
}

.tag-normal {
  background: #f3f1ff;
  color: #6f6477;
}

.carousel-shell {
  display: grid;
  gap: 14px;
}

.carousel-toolbar {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 120px 1fr 120px;
}

.carousel-count {
  align-items: center;
  background: #fbf8ff;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px 14px;
}

.carousel-count strong {
  color: var(--main-dark);
  font-weight: 800;
}

.carousel-count span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.result-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.result-dot {
  background: #dfd3ff;
  border: 0;
  border-radius: 999px;
  height: 9px;
  padding: 0;
  width: 9px;
}

.result-dot.active {
  background: var(--main);
  width: 28px;
}

.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}

.result-card.best {
  border-color: #d2c0ff;
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.1);
}

.result-card.check {
  border-color: #ffd1dc;
}

.result-head h3 {
  font-size: 26px;
  font-weight: 800;
  margin: 10px 0 8px;
}

.result-head p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.nearby-line {
  background: #fbf8ff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 12px 0 0;
  padding: 11px 12px;
}

.detail-collapse {
  margin-top: 12px;
}

.detail-collapse summary {
  background: var(--main);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  padding: 10px 16px;
}

.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.tag.best {
  background: var(--main-soft);
  color: var(--main-dark);
}

.tag.normal {
  background: #f3f1ff;
  color: #6f6477;
}

.tag.check {
  background: var(--danger-soft);
  color: var(--danger);
}

.metric-grid,
.commute-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px;
}

.transport-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 10px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  background: #fbf8ff;
  border-radius: 14px;
  padding: 14px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 14px;
}

.metric strong {
  display: block;
  font-size: 21px;
  font-weight: 800;
  margin-top: 3px;
}

.block {
  background: #fdfbff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 12px;
  padding: 16px;
}

.edit-panel {
  align-items: center;
  background: rgba(31, 27, 45, 0.34);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.edit-panel.hidden {
  display: none;
}

.edit-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(31, 27, 45, 0.22);
  max-width: 720px;
  padding: 26px;
  width: 100%;
}

.icon-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 14px;
}

.edit-name {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.wide {
  grid-column: 1 / -1;
}

.block h4 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 8px;
}

.block p,
.block li {
  color: var(--muted);
  line-height: 1.6;
}

.block ul {
  margin: 0;
  padding-left: 18px;
}

#shareText {
  min-height: 180px;
}

.hidden {
  display: none;
}

@media (max-width: 920px) {
  h1 {
    font-size: 34px;
  }

  .layout,
  .quick-grid,
  .form-grid.two,
  .form-grid.three,
  .metric-grid,
  .commute-grid,
  .transport-grid,
  .preference-options {
    grid-template-columns: 1fr;
  }

  .carousel-toolbar {
    grid-template-columns: 1fr;
  }

  .decision-card {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
  }
}


.subtle-full {
  box-shadow: none;
  margin-top: 10px;
}

.ranking-note {
  background: #fbf8ff;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  line-height: 1.7;
  padding: 14px 16px;
}

.ranking-note strong {
  color: var(--ink);
}

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

.block-title-row h4 {
  margin-bottom: 0;
}

/* Visual refresh: cleaner tool-style layout */
:root {
  --bg: #faf7ff;
  --card: #ffffff;
  --ink: #22172f;
  --muted: #766b86;
  --line: #eadff6;
  --main: #7c3aed;
  --main-dark: #5b21b6;
  --main-soft: #f2eaff;
  --danger: #dc5275;
  --danger-soft: #fff1f4;
  --shadow: 0 16px 42px rgba(80, 55, 120, 0.08);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(196, 181, 253, 0.34) 0, transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(251, 207, 232, 0.28) 0, transparent 26%),
    linear-gradient(180deg, #fcfaff 0%, #fff 48%, #fbf8ff 100%);
}

.hero,
.page {
  max-width: 1180px;
}

nav {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(234, 223, 246, 0.9);
  border-radius: 999px;
  margin-bottom: 18px;
  padding: 10px 14px;
}

nav strong {
  font-size: 18px;
}

.hero-simple {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 26px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
}

h1 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1.2px;
  margin-bottom: 0;
}

.panel {
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.section-title h2 {
  font-size: 22px;
}

input,
textarea {
  border-color: #e7d9f5;
  border-radius: 16px;
  font-size: 17px;
  padding: 15px 16px;
}

textarea {
  min-height: 190px;
}

input:focus,
textarea:focus {
  border-color: #c4b5fd;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
}

.preference-box,
.summary,
.ranking-note,
.nearby-line,
.metric {
  background: #fff;
}

.preference-options {
  gap: 10px;
}

.pref {
  border-color: #e7d9f5;
  font-size: 15px;
  padding: 12px 14px;
}

.pref.active {
  background: #eee5ff;
  border-color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08);
}

.primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.22);
}

.ghost {
  border-color: #e7d9f5;
}

.added-item,
.result-card,
.comparison-panel,
.decision-card {
  border-color: #e7d9f5;
  box-shadow: 0 10px 28px rgba(80, 55, 120, 0.06);
}

.decision-card {
  background: linear-gradient(135deg, #ffffff, #fbf7ff);
}

.comparison-table th {
  background: #f8f2ff;
  color: #655673;
}

.comparison-table td {
  font-size: 15px;
}

.comparison-table tbody tr:hover,
.comparison-table tbody tr.active {
  background: #f4ecff;
}

.source-mark {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
}

.metric strong {
  font-size: 20px;
}

.block {
  background: #fff;
  border-color: #eadff6;
}

@media (max-width: 920px) {
  .hero-simple {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Alignment polish: keep input and added panels visually balanced */
.layout {
  align-items: stretch;
  grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
  gap: 22px;
}

.panel.sticky {
  width: 100%;
}

#sourceInput {
  min-height: 300px;
}

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


/* Decision comparison table: show useful differences by default */
.decision-table {
  min-width: 980px;
}

.decision-table .compact-reason {
  max-width: 230px;
  min-width: 180px;
}

.decision-overview .comparison-title p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}


/* Multi commute comparison table */
.multi-commute-table {
  min-width: 1120px;
}

.multi-commute-table th,
.multi-commute-table td {
  padding: 11px 12px;
}

.multi-commute-table .compact-reason {
  max-width: 180px;
  min-width: 150px;
}


/* Selected house details: avoid repeating overview metrics */
.detail-focused {
  display: grid;
  gap: 14px;
}

.detail-focused .block {
  margin-top: 0;
}

.detail-highlight {
  background: #fbf7ff;
}

.detail-two-col {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .detail-two-col {
    grid-template-columns: 1fr;
  }
}

.ai-box {
  background: linear-gradient(135deg, #ffffff, #fbf7ff);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  gap: 14px;
  margin: 16px 0 18px;
  padding: 18px;
}

.ai-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.ai-head h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

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

.ai-head span {
  background: var(--main-soft);
  border-radius: 999px;
  color: var(--main-dark);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.requirement-input {
  min-height: 118px;
}

.ai-actions {
  display: flex;
  gap: 10px;
}

.primary.small,
.ghost.small {
  padding: 10px 16px;
}

.ai-result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.6;
  padding: 14px;
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-chips span {
  background: var(--main-soft);
  border-radius: 999px;
  color: var(--main-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.ai-chips .warn {
  background: #fff0f3;
  color: #c43f62;
}



.ai-decision-card {
  background: linear-gradient(135deg, #fff, #f7f0ff);
  border: 1px solid #decaff;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(112, 70, 190, 0.1);
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 20px;
}

.ai-decision-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ai-decision-top span,
.ai-decision-top em {
  background: var(--main-soft);
  border-radius: 999px;
  color: var(--main-dark);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  padding: 7px 10px;
}

.ai-decision-top em {
  background: #fff0f3;
  color: #c43f62;
}

.ai-decision-card h3 {
  font-size: 21px;
  line-height: 1.45;
  margin-bottom: 0;
}

.ai-decision-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-decision-grid p {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  margin-bottom: 0;
  padding: 13px;
}

.ai-decision-grid strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.ai-house-advice {
  background: #fbf7ff;
  border-color: #decaff;
}

.ai-house-advice .block-title-row span {
  background: var(--main);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 10px;
}

.ai-question-line {
  background: #fff;
  border: 1px dashed #d9c3ff;
  border-radius: 14px;
  color: var(--muted);
  margin-top: 10px;
  padding: 12px;
}

@media (max-width: 760px) {
  .ai-decision-grid {
    grid-template-columns: 1fr;
  }
}


.ai-main-actions {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.ai-main-actions .primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.24);
  min-width: 150px;
}

.ai-parse-result {
  background: #fff;
  border: 1px solid #decaff;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(112, 70, 190, 0.08);
  color: var(--muted);
  line-height: 1.65;
  margin-top: 14px;
  padding: 16px;
}

.ai-parse-result strong {
  color: var(--ink);
  display: block;
  font-size: 17px;
  margin-bottom: 6px;
}

.ai-parse-result p {
  margin-bottom: 10px;
}

.ai-parse-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-parse-list span {
  background: var(--main-soft);
  border-radius: 999px;
  color: var(--main-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.ai-summary-label {
  background: var(--main);
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  margin-right: 10px;
  padding: 6px 10px;
}

/* Header merge and spacing polish */
.brand-title {
  color: var(--main-dark);
  display: block;
  font-size: 18px;
  font-weight: 850;
  margin-bottom: 18px;
}

.hero-simple h1 {
  margin-bottom: 0;
}

.hero-actions {
  align-items: center;
  flex-shrink: 0;
}

.hero-actions span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  padding: 10px 14px;
}

/* Final alignment polish */
.hero,
.page {
  max-width: 1280px;
  padding-left: 28px;
  padding-right: 28px;
}

nav,
.hero-simple,
.layout,
#resultPanel,
#sharePanel {
  width: 100%;
}

nav,
.hero-simple {
  margin-left: 0;
  margin-right: 0;
}

#resultPanel,
#sharePanel {
  justify-self: stretch;
  max-width: none;
}

#results,
.comparison-panel,
.carousel-shell,
.result-card.detail-focused {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.layout {
  align-items: stretch;
}

.panel.sticky {
  display: flex;
  flex-direction: column;
  min-height: 690px;
}

.added-list {
  flex: 1;
  max-height: none;
  margin-bottom: 20px;
}

#analyzeBtn {
  margin-top: 0;
}

.detail-decision-grid,
.detail-two-col {
  align-items: stretch;
}

.detail-decision-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-decision-grid > .detail-main-card,
.detail-two-col > .block {
  height: 100%;
}

.detail-main-card {
  min-height: 124px;
}

@media (max-width: 920px) {
  .hero,
  .page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .panel.sticky {
    min-height: auto;
  }
}

/* Detail card polish: richer decisions without making the page feel crowded */
.results {
  gap: 22px;
}

.comparison-panel {
  padding: 20px;
}

.comparison-table-wrap {
  max-height: 460px;
}

.result-card.detail-focused {
  border-color: #dfcff7;
  box-shadow: 0 18px 44px rgba(82, 54, 130, 0.08);
  gap: 18px;
  padding: 24px;
}

.detail-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.detail-head h3 {
  font-size: 30px;
  line-height: 1.25;
  margin: 12px 0 0;
}

.detail-mini-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  min-width: 420px;
}

.detail-mini-metrics span {
  background: #fbf8ff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  padding: 12px 14px;
}

.detail-mini-metrics strong {
  color: var(--ink);
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.detail-decision-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-main-card {
  background: linear-gradient(135deg, #fbf7ff, #ffffff);
  border: 1px solid #dfcff7;
  border-radius: 20px;
  padding: 18px;
}

.detail-main-card h4,
.detail-focused .block h4 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  margin: 0 0 10px;
}

.detail-main-card p,
.detail-focused .block p,
.detail-focused .block li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.detail-main-card p {
  margin-bottom: 0;
}

.detail-focused .block {
  background: #fff;
  border-color: #eadff6;
  border-radius: 20px;
  padding: 18px;
}

.detail-focused .block ul {
  display: grid;
  gap: 7px;
  padding-left: 20px;
}

.warning-block {
  background: #fff9fb !important;
  border-color: #f4d3dd !important;
}

.nearby-detail {
  background: #fbf8ff !important;
}

.carousel-shell {
  gap: 18px;
}

.carousel-toolbar {
  margin-top: 4px;
}

.result-dots {
  margin-top: -8px;
}

@media (max-width: 920px) {
  .detail-head,
  .detail-decision-grid {
    grid-template-columns: 1fr;
  }

  .detail-head {
    flex-direction: column;
  }

  .detail-mini-metrics {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }
}
