:root {
  --bg: #090907;
  --panel: rgba(20, 18, 14, 0.92);
  --panel-soft: rgba(31, 28, 21, 0.82);
  --line: rgba(224, 190, 118, 0.24);
  --line-strong: rgba(224, 190, 118, 0.48);
  --gold: #d8b66a;
  --gold-bright: #f2d58d;
  --red: #c95745;
  --green: #85b783;
  --blue: #8ab1c7;
  --text: #f2ead9;
  --muted: #a79a83;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.46);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 182, 106, 0.13), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(139, 55, 42, 0.16), transparent 26%),
    linear-gradient(135deg, #060605 0%, #12100c 48%, #1d1810 100%);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.home-shell {
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: 38px 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--gold-bright);
  background: linear-gradient(145deg, rgba(242, 213, 141, 0.16), rgba(65, 42, 20, 0.5));
  box-shadow: inset 0 0 18px rgba(242, 213, 141, 0.08);
  font-size: 22px;
}

.brand-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brand-title,
.page-title {
  margin: 0;
  color: var(--gold-bright);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.12;
}

.page-title {
  font-size: clamp(24px, 3vw, 34px);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 28px;
  align-items: stretch;
}

.hero-panel,
.query-panel,
.results-panel,
.state-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--panel), rgba(11, 10, 8, 0.96));
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 520px;
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-panel::before,
.query-panel::before,
.results-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(242, 213, 141, 0.12), transparent 34%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04), transparent 40%);
}

.hero-content,
.query-content,
.results-content,
.state-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-title {
  margin: 0;
  max-width: 720px;
  color: #fff7df;
  font-size: clamp(38px, 7vw, 78px);
  font-weight: 900;
  line-height: 1.02;
}

.hero-copy {
  max-width: 660px;
  margin: 22px 0 0;
  color: #cfc3ad;
  font-size: 17px;
  line-height: 1.8;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 36px;
}

.stat {
  border: 1px solid rgba(216, 182, 106, 0.2);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.stat strong {
  display: block;
  color: var(--gold-bright);
  font-size: 20px;
  line-height: 1.2;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.query-panel {
  padding: 26px;
}

.query-panel h2,
.results-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
}

.query-panel p {
  margin: 8px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.query-form {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(216, 182, 106, 0.28);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--text);
  background: rgba(8, 7, 6, 0.78);
  font: inherit;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(216, 182, 106, 0.14);
}

.field select option {
  background: #14110d;
  color: var(--text);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(242, 213, 141, 0.42);
  border-radius: var(--radius);
  color: #161109;
  background: linear-gradient(180deg, #f2d58d, #b6883c);
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.mini-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(216, 182, 106, 0.18);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.search-strip {
  display: grid;
  grid-template-columns: 190px minmax(180px, 1fr) auto;
  gap: 10px;
  margin: 20px 0;
}

.search-strip .field {
  margin: 0;
}

.search-strip .btn {
  height: 48px;
}

.results-panel {
  padding: 20px;
}

.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 16px;
}

.results-meta {
  color: var(--muted);
  font-size: 13px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.data-table th {
  padding: 0 14px 8px;
  color: var(--gold);
  font-size: 12px;
  text-align: left;
  letter-spacing: 1px;
}

.data-table td {
  padding: 16px 14px;
  background: rgba(255, 255, 255, 0.035);
  border-top: 1px solid rgba(216, 182, 106, 0.14);
  border-bottom: 1px solid rgba(216, 182, 106, 0.14);
  color: #efe5cf;
  line-height: 1.55;
  vertical-align: top;
}

.data-table tr td:first-child {
  border-left: 3px solid var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}

.data-table tr td:last-child {
  border-right: 1px solid rgba(216, 182, 106, 0.14);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.data-table tr:hover td {
  background: rgba(216, 182, 106, 0.085);
}

.name-main {
  color: #fff4d2;
  font-weight: 800;
}

.drop-item {
  color: #ffb2a3;
  font-weight: 800;
}

.map-list {
  color: #bfe0b8;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(216, 182, 106, 0.28);
  border-radius: 999px;
  color: var(--gold-bright);
  background: rgba(216, 182, 106, 0.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.state-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 36px;
  text-align: center;
}

.state-content strong {
  display: block;
  color: var(--gold-bright);
  font-size: 24px;
}

.state-content span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-note {
  margin-top: 18px;
  color: rgba(242, 234, 217, 0.58);
  font-size: 12px;
  text-align: center;
}

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

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

  .search-strip {
    grid-template-columns: 1fr;
  }

  .results-heading,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: 10px;
    border: 1px solid rgba(216, 182, 106, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
  }

  .data-table td {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 10px 14px;
  }

  .data-table tr td:first-child,
  .data-table tr td:last-child {
    border: 0;
    border-radius: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .hero-panel,
  .query-panel,
  .results-panel,
  .state-panel {
    padding: 18px;
  }

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

  .button-row,
  .button-row .btn {
    width: 100%;
  }
}
