:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Noto Sans TC", sans-serif;
  color: #20231f;
  background: #f5f2eb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 36px 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #176b4d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.1;
}

.snapshot-meta {
  margin: 10px 0 0;
  color: #676b64;
}

.logout {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #cbc7bd;
  border-radius: 10px;
  background: #fff;
  color: #4f544d;
}

.product-switch {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid #cbc7bd;
  border-radius: 12px;
  background: #e9e5dc;
}

.product-button {
  min-width: 96px;
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5a5d57;
  font-weight: 800;
}

.product-button.is-active {
  background: #176b4d;
  color: #fff;
  box-shadow: 0 2px 7px #153d2f2e;
}

.watch-rules {
  margin-bottom: 14px;
  border: 1px solid #cddbd3;
  border-radius: 12px;
  background: #f0f7f3;
  color: #445149;
}

.watch-rules summary {
  padding: 14px 18px;
  color: #176b4d;
  cursor: pointer;
  font-weight: 800;
}

.watch-rules-content {
  padding: 0 18px 16px;
  line-height: 1.65;
}

.watch-rules-content p {
  margin: 0 0 8px;
}

.watch-rules-content ul {
  margin: 0 0 10px;
  padding-left: 1.25rem;
}

.watch-rules-content code {
  overflow-wrap: anywhere;
}

.judgment-source {
  display: block;
  margin-top: 5px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(150px, 0.35fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #ddd8cd;
  border-radius: 16px;
  background: #fff;
}

.controls:has(.checkbox-control:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(150px, 0.35fr));
}

.controls label span {
  display: block;
  margin: 0 0 7px;
  color: #595e57;
  font-size: 0.8rem;
  font-weight: 700;
}

.checkbox-control {
  align-self: end;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding-inline: 12px;
  border: 1px solid #aaa89f;
  border-radius: 9px;
}

.checkbox-control:not([hidden]) {
  display: flex;
}

.checkbox-control input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.checkbox-control span {
  margin: 0 !important;
  font-size: 0.9rem !important;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding-inline: 13px;
  border: 1px solid #aaa89f;
  border-radius: 9px;
  background: #fff;
  color: #20231f;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #62b897;
  outline-offset: 2px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-block: 24px 14px;
  overflow-x: auto;
}

.tab {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d2cec4;
  border-radius: 999px;
  background: transparent;
  color: #555a53;
  font-weight: 750;
  white-space: nowrap;
}

.tab span {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  padding-inline: 5px;
  border-radius: 99px;
  background: #e5e2da;
  font-size: 0.75rem;
}

.tab.is-active {
  border-color: #176b4d;
  background: #176b4d;
  color: #fff;
}

.tab.is-active span {
  background: #ffffff24;
}

.notice {
  margin-bottom: 14px;
  padding: 12px 15px;
  border: 1px solid #e4c875;
  border-radius: 10px;
  background: #fff8d9;
  color: #68520d;
  font-size: 0.9rem;
}

.market-reference {
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #cddbd3;
  border-radius: 12px;
  background: #f0f7f3;
  color: #445149;
}

.market-reference h2 {
  margin: 0 0 6px;
  color: #176b4d;
  font-size: 1rem;
}

.market-reference p {
  margin: 0 0 5px;
  line-height: 1.6;
}

.status {
  padding: 48px 16px;
  color: #686c65;
  text-align: center;
}

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

.listing-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #ddd8cd;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px #332d2010;
}

.listing-card.is-new {
  border-color: #78ad96;
}

.listing-media {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: #e8e5dd;
  color: #74786f;
  font-size: 0.85rem;
  font-weight: 700;
}

.listing-media.is-placeholder {
  background:
    linear-gradient(135deg, transparent 49.5%, #d8d4ca 50%, transparent 50.5%),
    #e8e5dd;
}

.listing-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.listing-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.listing-image-link:hover img {
  transform: scale(1.02);
}

.listing-content {
  padding: 19px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.badge,
.flag-badge,
.source-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dff3e9;
  color: #0d6745;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.flag-badge {
  background: #edf0f7;
  color: #4c5870;
}

.source-badge {
  background: #ebe7df;
  color: #555149;
  text-transform: uppercase;
}

.listing-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.listing-card h2 a {
  color: #20231f;
  text-decoration-color: #9a9d96;
  text-underline-offset: 3px;
}

.listing-card h2 a:hover {
  color: #176b4d;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin: 16px 0 10px;
}

.score-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0f7f3;
}

.score-panel .fact:first-child dd {
  color: #176b4d;
  font-size: 1.2rem;
}

.fact {
  margin: 0;
}

.fact dt {
  color: #757970;
  font-size: 0.72rem;
}

.fact dd {
  margin: 2px 0 0;
  font-weight: 750;
}

.address,
.strategy-note,
.first-seen,
.listing-id {
  margin: 7px 0 0;
  color: #5e635c;
  font-size: 0.88rem;
  line-height: 1.5;
}

.strategy-note {
  padding: 9px 11px;
  border-radius: 8px;
  background: #f7f3e9;
  color: #665b40;
}

.strategy-judgment {
  margin-top: 9px;
  padding: 11px 13px;
  border-left: 3px solid #176b4d;
  background: #f0f7f3;
  color: #445149;
  font-size: 0.88rem;
  line-height: 1.5;
}

.strategy-judgment p {
  margin: 8px 0 2px;
  font-weight: 750;
}

.strategy-judgment ul {
  margin: 0;
  padding-left: 1.2rem;
}

.first-seen {
  color: #176b4d;
  font-weight: 750;
}

.listing-id {
  color: #898c85;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
}

footer {
  padding-block: 38px;
  color: #7a7e76;
  font-size: 0.78rem;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    padding-top: 24px;
  }

  .controls,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .controls {
    padding: 13px;
  }

  .listing-card {
    border-radius: 12px;
  }

  .listing-content {
    padding: 16px;
  }
}
