:root {
  --bg-top: #f3efe7;
  --bg-bottom: #e6ece7;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --line: rgba(34, 59, 52, 0.1);
  --line-strong: rgba(34, 59, 52, 0.18);
  --text-main: #1f302c;
  --text-soft: #62726b;
  --accent: #1f6a59;
  --accent-deep: #133f35;
  --accent-soft: #edf6f2;
  --warm: #c98b54;
  --warm-soft: #f6ede2;
  --danger: #b64d33;
  --shadow-xl: 0 28px 80px rgba(24, 47, 40, 0.13);
  --shadow-lg: 0 18px 40px rgba(24, 47, 40, 0.12);
  --radius-2xl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --font-display: "Source Han Serif SC", "Songti SC", "STZhongsong", serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 10%, rgba(201, 139, 84, 0.16), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(31, 106, 89, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

img {
  display: block;
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 100% 48px;
  opacity: 0.28;
}

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 40px 18px 56px;
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(16px);
  pointer-events: none;
}

.ambient-one {
  top: 2%;
  right: -90px;
  width: 240px;
  height: 240px;
  background: rgba(31, 106, 89, 0.12);
}

.ambient-two {
  bottom: 8%;
  left: -70px;
  width: 200px;
  height: 200px;
  background: rgba(201, 139, 84, 0.14);
}

.page-card {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 38px;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--shadow-xl);
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  margin: 18px auto 0;
  padding: 0 12px;
  text-align: center;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.7;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: var(--accent);
  opacity: 1;
  outline: none;
}

.brand-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px 22px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(19, 63, 53, 0.96), rgba(31, 106, 89, 0.9));
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.brand-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.hero {
  margin-top: 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.hero-main,
.lookup-card,
.result-panel,
.notes-card,
.qr-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--surface-soft);
}

.hero-main,
.result-panel,
.notes-card,
.qr-card {
  padding: 26px;
}

.hero-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 247, 0.92));
  box-shadow: 0 14px 28px rgba(24, 47, 40, 0.06);
}

.hero-tag,
.section-kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-tag {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

.hero-main h1,
.lookup-head h2,
.result-head h2,
.notes-card h2,
.recommend-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-main h1 {
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height: 1.18;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text-soft);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-point {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(31, 106, 89, 0.08);
  border: 1px solid rgba(31, 106, 89, 0.14);
  font-size: 0.94rem;
}

.lookup-card {
  margin-top: 18px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(19, 63, 53, 0.96), rgba(31, 106, 89, 0.92));
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.lookup-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lookup-head .section-kicker,
.lookup-head h2 {
  color: #ffffff;
}

.lookup-head .section-kicker {
  opacity: 0.72;
}

.lookup-head h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.lookup-note {
  margin: 0;
  max-width: 20rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.76);
}

.field-label {
  display: block;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

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

.input-shell {
  position: relative;
}

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 17px 62px 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  font: inherit;
  font-size: 1rem;
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-shell input::placeholder {
  color: #87938e;
}

.input-shell input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.input-unit {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b7872;
}

.field-row button {
  min-width: 156px;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  padding: 0 24px;
  font: inherit;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #d49b63, #b9783f);
  box-shadow: 0 16px 32px rgba(17, 34, 29, 0.2);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.field-row button:hover,
.field-row button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(17, 34, 29, 0.24);
  outline: none;
}

.field-row button:active {
  transform: translateY(0);
  opacity: 0.94;
}

.quick-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.lookup-hint {
  display: inline-flex;
  align-items: center;
  margin: 14px 0 0;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.quick-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.quick-chip:hover,
.quick-chip:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.form-message {
  min-height: 1.5em;
  margin: 12px 0 0;
  line-height: 1.65;
  color: #ffd7ca;
}

.result-panel {
  margin-top: 18px;
  scroll-margin-top: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 248, 0.92));
}

.result-head {
  margin-bottom: 18px;
}

.result-head h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.result-panel.is-empty .result-placeholder {
  display: grid;
}

.result-panel.is-empty .result-content {
  display: none;
}

.result-panel:not(.is-empty) .result-placeholder {
  display: none;
}

.result-content {
  display: block;
  animation: rise 0.3s ease;
}

.placeholder-mark {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 30%, rgba(201, 139, 84, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(31, 106, 89, 0.14), rgba(31, 106, 89, 0.04));
  box-shadow: inset 0 0 0 1px rgba(31, 106, 89, 0.1);
}

.placeholder-mark::before,
.placeholder-mark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(31, 106, 89, 0.7);
}

.placeholder-mark::before {
  top: 22px;
  left: 17px;
  width: 38px;
  height: 8px;
}

.placeholder-mark::after {
  top: 38px;
  left: 17px;
  width: 28px;
  height: 8px;
}

.placeholder-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.placeholder-copy,
.metric-footnote {
  margin: 10px 0 0;
  line-height: 1.75;
  color: var(--text-soft);
}

.result-main-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.metric-card,
.recommend-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(34, 59, 52, 0.08);
}

.metric-card {
  background:
    linear-gradient(160deg, rgba(19, 63, 53, 0.96), rgba(31, 106, 89, 0.9));
  color: #ffffff;
  box-shadow: var(--shadow-lg);
}

.metric-label,
.recommend-count {
  margin: 0;
  font-size: 0.92rem;
}

.metric-label {
  color: rgba(255, 255, 255, 0.72);
}

.metric-value {
  margin: 18px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.metric-footnote {
  color: rgba(255, 255, 255, 0.74);
}

.recommend-card {
  background: var(--surface-strong);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.recommend-card h3 {
  font-size: clamp(1.4rem, 2.3vw, 1.8rem);
}

.recommend-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm);
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(31, 106, 89, 0.12);
  background: linear-gradient(180deg, #f8fbfa, #eef5f1);
  color: var(--text-main);
  font-size: 0.97rem;
  line-height: 1.3;
  box-shadow: 0 8px 18px rgba(29, 49, 43, 0.05);
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 280px;
  gap: 18px;
  margin-top: 18px;
}

.notes-card h2 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.notes-card ul {
  margin: 18px 0 0;
  padding-left: 1.25rem;
  color: var(--text-soft);
  line-height: 1.9;
}

.qr-card {
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 240, 231, 0.9));
}

.qr-image {
  width: min(100%, 186px);
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(24, 47, 40, 0.08);
}

.qr-title {
  margin: 16px 0 0;
  font-size: 1.02rem;
  font-weight: 800;
}

.qr-note {
  margin: 8px 0 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-soft);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .result-main-grid,
  .support-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 720px) {
  body::before,
  .ambient {
    display: none;
  }

  .page-shell {
    padding:
      max(14px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .page-card {
    padding: 12px;
    border-radius: 24px;
    backdrop-filter: none;
  }

  .brand-banner,
  .hero-main,
  .lookup-card,
  .result-panel,
  .notes-card,
  .qr-card {
    padding: 18px;
    border-radius: 20px;
  }

  .lookup-head,
  .field-row,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .field-row button {
    width: 100%;
    min-width: 0;
    min-height: 54px;
  }

  .brand-headline {
    font-size: 1.08rem;
    line-height: 1.7;
  }

  .hero {
    margin-top: 14px;
  }

  .hero-main h1 {
    font-size: 1.9rem;
    line-height: 1.24;
    text-align: center;
  }

  .hero-copy {
    margin-top: 12px;
    font-size: 0.96rem;
    line-height: 1.8;
    max-width: none;
    text-align: center;
  }

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

  .hero-point {
    min-height: 44px;
    justify-content: center;
    padding: 10px 12px;
    text-align: center;
    font-size: 0.9rem;
  }

  .lookup-head {
    gap: 8px;
    margin-bottom: 14px;
  }

  .lookup-head h2 {
    font-size: 1.32rem;
  }

  .lookup-note,
  .lookup-hint {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .lookup-hint {
    display: block;
    padding: 10px 12px;
    border-radius: 14px;
    text-align: center;
  }

  .field-label {
    margin-bottom: 10px;
  }

  .input-shell input {
    padding: 15px 56px 15px 16px;
    font-size: 1rem;
  }

  .quick-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .quick-chip {
    min-height: 40px;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .form-message {
    margin-top: 10px;
    font-size: 0.92rem;
  }

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

  .result-head h2 {
    font-size: 1.32rem;
  }

  .placeholder-mark {
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 20px;
  }

  .placeholder-mark::before {
    top: 18px;
    left: 14px;
  }

  .placeholder-mark::after {
    top: 32px;
    left: 14px;
  }

  .placeholder-title {
    font-size: 1.04rem;
  }

  .placeholder-copy {
    font-size: 0.94rem;
    line-height: 1.7;
  }

  .metric-card,
  .recommend-card {
    padding: 18px;
  }

  .metric-card {
    text-align: center;
  }

  .metric-value {
    margin-top: 12px;
    font-size: 2.15rem;
  }

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

  .recommend-card h3 {
    font-size: 1.25rem;
  }

  .recommend-count {
    justify-content: center;
    min-height: 32px;
    width: fit-content;
  }

  .tag-item {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 14px;
  }

  .support-grid {
    gap: 14px;
  }

  .notes-card ul {
    margin-top: 14px;
    padding-left: 1.1rem;
    font-size: 0.94rem;
    line-height: 1.8;
  }

  .qr-image {
    width: min(100%, 172px);
  }

  .site-footer {
    margin-top: 14px;
    padding: 0 8px;
  }

  .site-footer-link {
    min-height: 36px;
    font-size: 0.82rem;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 48, 44, 0.6);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.25s ease;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-header p {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.modal-field {
  margin-bottom: 16px;
}

.modal-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font: inherit;
  font-size: 1.05rem;
  color: var(--text-main);
  letter-spacing: 0.05em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-field input::placeholder {
  color: #9ca8a3;
  letter-spacing: 0;
}

.modal-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 106, 89, 0.12);
}

.phone-message {
  min-height: 1.4em;
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--danger);
}

.phone-message:empty {
  display: none;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-secondary,
.btn-primary {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(31, 106, 89, 0.15);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(31, 106, 89, 0.12);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(31, 106, 89, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(31, 106, 89, 0.3);
  outline: none;
}

.btn-primary:active {
  transform: translateY(0);
  opacity: 0.95;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (max-width: 420px) {
  .brand-headline {
    font-size: 1rem;
  }

  .hero-main h1 {
    font-size: 1.74rem;
  }

  .hero-main,
  .lookup-card,
  .result-panel,
  .notes-card,
  .qr-card {
    padding: 16px;
  }

  .hero-points,
  .quick-chip-row {
    grid-template-columns: 1fr;
  }

  .hero-point,
  .quick-chip {
    width: 100%;
  }
}
