:root {
  --ink: #172326;
  --muted: #5e6f73;
  --line: #dfe7e5;
  --paper: #fbfcf9;
  --panel: rgba(255, 255, 255, 0.92);
  --teal: #0f766e;
  --teal-dark: #0a4f49;
  --coral: #d7664d;
  --gold: #b9892f;
  --sky: #dff3f4;
  --shadow: 0 16px 46px rgba(20, 42, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(6, 34, 38, 0.04) 0, rgba(6, 34, 38, 0.24) 245px, rgba(251, 252, 249, 0.94) 590px),
    url("https://images.unsplash.com/photo-1540202404-a2f29016b523?auto=format&fit=crop&w=2600&q=90")
      center 12% / cover no-repeat,
    linear-gradient(135deg, #9ee8ee 0%, #d9f8f3 48%, #fbfcf9 100%),
    var(--paper);
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 40px) 48px;
}

.hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  color: white;
  padding: 28px 0 32px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.hero h1 {
  margin: 8px 0 12px;
  max-width: 760px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero__summary {
  max-width: 620px;
  margin: 0;
  font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.94);
}

.eyebrow {
  margin: 0;
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.78;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(7, 30, 34, 0.28);
  color: rgba(255, 255, 255, 0.9);
  opacity: 1;
  backdrop-filter: blur(10px);
}

.hero__stats {
  width: min(390px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  text-shadow: none;
}

.hero__stats div {
  min-height: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 14px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 32, 36, 0.22);
}

.hero__stats div:last-child {
  border-right: 0;
}

.hero__stats strong {
  color: white;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.hero__stats span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 750;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  height: calc(100vh - 32px);
  min-height: 720px;
}

.planner,
.results,
.compare-section,
.detail-modal {
  border: 1px solid rgba(210, 224, 221, 0.86);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.planner,
.results {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.planner {
  position: sticky;
  top: 16px;
  padding: 22px;
}

.results {
  padding: 22px;
}

.panel-title,
.result-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

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

h2,
h3 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 19px;
}

.field {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.filter-intro {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-panel {
  margin: 0 0 22px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.chat-box {
  max-height: 210px;
  overflow: auto;
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfa;
}

.chat-message {
  max-width: 95%;
  padding: 10px 12px;
  border-radius: 8px;
  background: white;
}

.chat-message--user {
  justify-self: end;
  color: white;
  background: var(--teal);
}

.chat-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.chat-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.ai-input {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.ai-input textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: white;
  line-height: 1.5;
}

.ai-actions {
  margin-top: 10px;
}

.prompt-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.prompt-examples button {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal-dark);
  background: white;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.parsed-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cfe5df;
  border-radius: 8px;
  background: #f0faf7;
}

.parsed-panel > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
}

.parsed-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 12px;
  align-items: start;
  font-size: 13px;
}

.parsed-grid span {
  color: var(--muted);
  font-weight: 800;
}

.parsed-grid b {
  color: var(--ink);
}

.parsed-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field--inline {
  grid-template-columns: auto 150px;
  align-items: center;
  margin: 0;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
}

input[type="range"] {
  accent-color: var(--teal);
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

legend,
.field > span {
  color: var(--muted);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-grid label,
.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.helper-list {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfa;
}

.helper-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.helper-list b {
  color: var(--ink);
}

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

.segmented label {
  justify-content: center;
  border-radius: 6px;
}

.primary-action,
.text-button,
.icon-button {
  border: 0;
  cursor: pointer;
}

.primary-action {
  width: 100%;
  min-height: 46px;
  border-radius: 6px;
  color: white;
  background: var(--teal);
  font-weight: 850;
}

.primary-action:hover {
  background: var(--teal-dark);
}

.text-button {
  color: var(--teal);
  background: transparent;
  font-weight: 800;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--sky);
  font-size: 19px;
  font-weight: 900;
}

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

.summary-item {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.summary-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  font-size: 19px;
}

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

.resort-card {
  display: grid;
  grid-template-rows: 190px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.card-media {
  position: relative;
  min-height: 190px;
  background: var(--sky);
}

.card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 2px;
  min-width: 92px;
  min-height: 58px;
  align-content: center;
  justify-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: white;
  background: rgba(15, 118, 110, 0.92);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.score-badge span {
  font-size: 16px;
  line-height: 1;
}

.score-badge small {
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.meta-row,
.tag-row,
.card-actions,
.detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #e4f5f1;
  font-size: 12px;
  font-weight: 850;
}

.tag--risk {
  color: #7a3a22;
  background: #fdeade;
}

.reason {
  min-height: 66px;
  margin: 12px 0;
}

.reason strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 13px;
}

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

.card-actions {
  margin-top: 12px;
}

.card-actions button {
  flex: 1;
  min-width: 112px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.card-actions button:first-child {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.compare-section {
  margin-top: 18px;
  padding: 22px;
}

.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
}

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

.compare-table th {
  width: 150px;
  color: var(--muted);
  background: #f3f8f6;
}

dialog {
  width: min(980px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(11, 30, 33, 0.52);
}

.detail-modal {
  position: relative;
  max-height: 88vh;
  overflow: auto;
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 20px;
  align-items: stretch;
}

.detail-hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
}

.detail-copy {
  display: grid;
  align-content: center;
  gap: 12px;
}

.detail-grid {
  margin-top: 20px;
}

.metric {
  flex: 1 1 140px;
  padding: 14px;
  border: 1px solid var(--line);
  background: white;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

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

.detail-section {
  margin-top: 22px;
}

.section-heading {
  margin-bottom: 12px;
}

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

.media-card,
.environment-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.media-card img,
.environment-card img {
  width: 100%;
  height: 170px;
  display: block;
  object-fit: cover;
}

.media-card > div,
.environment-card > div {
  padding: 13px;
}

.media-card h4,
.environment-card h4 {
  margin: 0;
  font-size: 16px;
}

.media-card p,
.environment-card p,
.data-note,
.source-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.source-note {
  margin: -4px 0 12px;
}

.source-note a,
.source-link {
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.source-link {
  display: inline-flex;
  margin-top: 10px;
  font-size: 13px;
}

.environment-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.environment-title strong {
  color: var(--teal);
  white-space: nowrap;
}

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

.price-reference div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.price-reference span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.price-reference strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
}

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

.feature-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #58390b;
  background: #fff2cf;
  font-size: 13px;
  font-weight: 850;
}

.feature-list--hero {
  margin-top: 4px;
}

.note-box {
  padding: 16px;
  border: 1px solid var(--line);
  background: white;
}

.note-box p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .hero,
  .workspace,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .workspace {
    height: auto;
    min-height: 0;
  }

  .planner,
  .results {
    height: auto;
  }

  .planner {
    position: static;
    max-height: 78vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .results {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  body {
    background-size: auto 500px;
  }

  .app-shell {
    padding-inline: 12px;
  }

  .hero {
    min-height: 380px;
  }

  .hero__stats,
  .summary-strip,
  .cards,
  .media-grid,
  .environment-grid,
  .price-reference,
  .two-col {
    grid-template-columns: 1fr;
  }

  .planner,
  .results,
  .compare-section,
  .detail-modal {
    padding: 16px;
  }

  .field--inline {
    grid-template-columns: 1fr;
  }

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