:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #68736c;
  --paper: #fffaf1;
  --surface: #ffffff;
  --line: rgba(23, 33, 27, 0.1);
  --green: #1f7a4d;
  --green-dark: #14593b;
  --tomato: #d94835;
  --gold: #efb84a;
  --blue: #326c88;
  --shadow: 0 22px 60px rgba(32, 27, 20, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5efe4;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
select,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 12% 18%, rgba(239, 184, 74, 0.2), transparent 28%),
    linear-gradient(180deg, #fff6e6 0%, #fffaf3 42%, #f6efe4 100%);
  box-shadow: 0 0 0 1px rgba(20, 89, 59, 0.06);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(23, 33, 27, 0.15), rgba(255, 250, 241, 0.9) 58%, #fffaf3 100%),
    url("https://images.unsplash.com/photo-1559847844-5315695dadae?auto=format&fit=crop&w=1100&q=82")
      center top / cover;
}

.hero__bg::after {
  position: absolute;
  inset: 42% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, #fffaf3 72%);
}

.hero__content {
  display: flex;
  min-height: 680px;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 18px 24px;
}

.topbar,
.section-head,
.shop-title-row,
.card-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
}

.location-pill,
.preview-pill,
.chip,
.mini-chip,
.ghost-button,
.text-button,
.secondary-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.location-pill {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(23, 33, 27, 0.12);
}

.location-pill span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.location-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--tomato);
  box-shadow: 0 0 0 5px rgba(217, 72, 53, 0.16);
}

.preview-pill {
  flex: 0 0 auto;
  padding: 9px 11px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: auto 0 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

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

h1 {
  color: #fff;
  font-size: clamp(48px, 14vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.hero-copy {
  width: min(310px, 100%);
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.55;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.quick-panel {
  margin-top: 26px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.field-group + .field-group,
.field-grid {
  margin-top: 16px;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 800;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.text-button {
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented,
.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar,
.category-row::-webkit-scrollbar {
  display: none;
}

.chip,
.mini-chip {
  flex: 0 0 auto;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.chip {
  padding: 10px 13px;
  font-size: 14px;
}

.mini-chip {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 13px;
}

.chip:active,
.mini-chip:active,
.primary-action:active,
.ghost-button:active,
.secondary-action:active {
  transform: scale(0.98);
}

.chip.is-active,
.mini-chip.is-active {
  border-color: rgba(31, 122, 77, 0.32);
  background: var(--green);
  color: #fff;
}

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

.select-field {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.select-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.primary-action {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--tomato), #ec7a3f 56%, var(--gold));
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(217, 72, 53, 0.28);
}

.result-section,
.inspiration-section {
  padding: 4px 18px 26px;
}

.section-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head.compact {
  margin-top: 8px;
}

.section-kicker {
  margin-bottom: 3px;
  color: var(--tomato);
  font-size: 12px;
  font-weight: 900;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

.ghost-button {
  flex: 0 0 auto;
  padding: 10px 13px;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.shop-card {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 27, 0.08);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shop-photo-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #efe2d1;
}

.shop-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.shop-distance {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(23, 33, 27, 0.76);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.shop-body {
  padding: 17px;
}

.shop-title-row {
  justify-content: space-between;
  gap: 14px;
}

.shop-category {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

h3 {
  font-size: 26px;
  line-height: 1.12;
}

.score-badge {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 18px;
  background: #f2f8ec;
  color: var(--green-dark);
}

.score-badge span {
  margin-bottom: -10px;
  font-size: 22px;
  font-weight: 950;
}

.score-badge small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reason {
  margin-top: 14px;
  color: #3f4a43;
  font-size: 15px;
  line-height: 1.65;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.meta-grid div {
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: #f8f2e8;
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.meta-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

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

.tag-row span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(50, 108, 136, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.card-actions {
  gap: 10px;
  margin-top: 18px;
}

.nav-button,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 900;
}

.nav-button {
  flex: 1 1 auto;
  background: var(--green);
  color: #fff;
}

.secondary-action {
  flex: 0 0 auto;
  padding: 0 13px;
  color: var(--muted);
}

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

.idea-card {
  min-height: 128px;
  padding: 13px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(23, 33, 27, 0.04), rgba(23, 33, 27, 0.18)),
    var(--idea-image) center / cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(32, 27, 20, 0.13);
}

.idea-card h3 {
  font-size: 17px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.idea-card p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

@media (min-width: 760px) {
  body {
    padding: 28px 0;
    background:
      linear-gradient(90deg, rgba(31, 122, 77, 0.08), transparent 24%, transparent 76%, rgba(217, 72, 53, 0.08)),
      #efe6d8;
  }

  .app-shell {
    min-height: calc(100vh - 56px);
    overflow: hidden;
    border-radius: 34px;
  }
}

@media (max-width: 370px) {
  .hero__content,
  .result-section,
  .inspiration-section {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  h3 {
    font-size: 23px;
  }
}
