:root {
  color-scheme: light;
  --bg: #f8f7f1;
  --paper: #fffefa;
  --ink: #233c33;
  --muted: #53665a;
  --line: #d7dacc;
  --accent: #a45133;
  --wash: #e9ecdf;
  --cta: #304e40;
  --button-ink: #fffdf6;
  --radius: 19px;
  --shadow: 0 12px 32px #2b3c3010;
  font:
    16px/1.55 "Instrument Sans",
    "Segoe UI",
    "Microsoft JhengHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
button svg,
i svg {
  width: 19px;
  height: 19px;
}
i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
small {
  font-size: 0.8rem;
}
.skip {
  position: absolute;
  top: -55px;
  left: 12px;
  background: white;
  padding: 8px;
  z-index: 9;
}
.skip:focus {
  top: 0;
}
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.navwrap,
main {
  width: min(1296px, calc(100% - 8vw));
  margin: auto;
}
.navwrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 42px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand span,
.foot-brand {
  font-weight: 850;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}
.brand small,
.foot-brand small {
  display: block;
  font:
    700 0.7rem/1.1 "Segoe UI",
    sans-serif;
  letter-spacing: 0.12em;
}
.navwrap nav {
  display: flex;
  align-self: stretch;
  gap: 32px;
  align-items: stretch;
  margin-left: auto;
}
.navwrap nav a,
.navwrap nav button {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 650;
  font-size: 0.94rem;
  border-bottom: 3px solid transparent;
  padding: 3px 0 0;
}
.navwrap nav a.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.count {
  font-size: 0.75rem;
  min-width: 18px;
  text-align: center;
  background: var(--wash);
  border-radius: 9px;
}
.appearance,
.sort,
.outline {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 650;
  font-size: 0.9rem;
}
.hero {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  overflow: hidden;
  margin: 30px 0 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.editorial {
  padding: clamp(28px, 3.8vw, 56px);
}
.market,
.eyeline {
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  font-weight: 750;
  color: var(--accent);
}
.market {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.055em;
}
.market span {
  color: var(--line);
}
h1 {
  font:
    750 clamp(2.4rem, 3.6vw, 3.75rem) / 1.2 "Baskervville",
    "Noto Serif TC",
    "PMingLiU",
    serif;
  letter-spacing: 0.025em;
  margin: 16px 0 22px;
}
h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero-photo {
  position: relative;
  min-height: 100%;
  background: var(--wash);
}
.hero-photo img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 60%;
}
.hero-photo figcaption {
  position: absolute;
  bottom: 19px;
  left: 22px;
  color: white;
  text-shadow: 0 1px 8px #000;
  background: #201b1769;
  border: 1px solid #ffffff4d;
  border-radius: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.83rem;
  padding: 4px 11px;
}
.hero-photo small {
  font-size: 0.72rem;
}
.step-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 650;
}
.segments {
  display: flex;
  gap: 4px;
}
.segments b {
  width: 24px;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
}
.segments b.on {
  background: var(--accent);
}
.question {
  font-weight: 750;
  font-size: 1.35rem;
  margin: 8px 0 12px;
}
.fieldrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.unit-switch {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.unit-switch .choice {
  min-height: 36px;
  padding: 4px 14px;
}
.language {
  max-width: 11em;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
}
html:lang(en) .brand small, html:lang(en) .foot-brand small {display: none;}
@media (max-width: 660px) {
  .language {margin-left: 6px; max-width: 9.5em;}
  html:lang(en) .appearance span {display: none;}
  html:lang(en) .sort select {max-width: 9.5em;}
  .section-head {flex-wrap: wrap; gap: 8px;}
  .field select {padding-right: 0;}
}
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 9px 12px;
  border-radius: 10px;
  min-width: 0;
}
.field > i {
  color: var(--accent);
}
.field span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.field small {
  color: var(--muted);
  font-size: 0.76rem;
}
.field select,
.sort select {
  appearance: none;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 650;
  padding: 0 19px 0 0;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right center;
}
.sort select {
  padding-right: 23px;
}
.field select {
  width: 100%;
  font-size: 1.15rem;
}
.field select option,
.sort select option {
  background: var(--paper);
  color: var(--ink);
}
:root {
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='9' fill='none' stroke='%237b877d' stroke-width='1.7'%3E%3Cpath d='m1 2 5 5 5-5'/%3E%3C/svg%3E");
}
.actions {
  display: flex;
  gap: 9px;
  margin-top: 15px;
  align-items: center;
}
.primary,
.outline,
.chip,
.choice {
  min-height: 42px;
}
.primary {
  background: var(--cta);
  color: var(--button-ink);
  border-radius: 9px;
  padding: 9px 20px;
  font-weight: 700;
}
.actions .primary {
  flex: 1;
}
.back {
  font-weight: 600;
  padding: 10px;
}
.choices,
.filters,
.tags,
.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.extra-group {
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  min-width: 0;
}
.extra-group legend {
  padding: 0 0 6px;
  font-weight: 700;
}
.extra-note {
  margin: 0 0 16px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.choice,
.chip {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 12px;
  background: var(--paper);
  font-size: 0.9rem;
}
.choice[aria-pressed="true"],
.chip[aria-pressed="true"] {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--button-ink);
}
.chip {
  border-radius: 24px;
  min-height: 36px;
}
.catalog {
  margin-bottom: 42px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.eyeline {
  font-size: 0.73rem;
  letter-spacing: 0.16em;
}
.section-head h2,
dialog h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  line-height: 1.35;
  margin-top: 3px;
  letter-spacing: 0.025em;
}
.filters {
  margin: 14px 0;
}
.metadata,
.sub {
  color: var(--muted);
  font-size: 0.875rem;
}
.metadata {
  margin: 8px 0 14px;
}
.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-image {
  width: 100%;
  height: 195px;
  display: grid;
  place-items: center;
  background: #efeee8;
  position: relative;
  padding: 12px;
}
.product-image img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.noimg {
  font-size: 0.83rem;
  color: #565e55;
}
.card-body {
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.brandline {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card h3 {
  font-size: 1.32rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag,
.reason {
  font-size: 0.8rem;
  background: var(--wash);
  padding: 3px 9px;
  border-radius: 5px;
}
.price {
  font-weight: 800;
  font-size: 1.3rem;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: auto;
}
.linklike,
footer button {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.compare-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
}
.compare-btn[aria-pressed="true"] {
  background: var(--wash);
}
#more {
  margin: 18px auto;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.foot-brand small {
  display: inline;
  font-size: 0.65rem;
}
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: min(720px, 94vw);
  max-height: 86dvh;
  padding: 22px;
  box-shadow: 0 25px 85px #0003;
}
dialog::backdrop {
  background: #14221bb8;
}
.dialogbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialogbar button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wash);
}
#dialogbody > * + * {
  margin-top: 14px;
}
.compare-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
td,
th {
  padding: 9px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
}
table a,
.detail-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stats div,
.summary {
  padding: 12px;
  border-radius: 9px;
  background: var(--wash);
}
.stats b,
.stats small {
  display: block;
}
.price-trend {
  padding: clamp(12px, 3vw, 20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}
.trend-heading, .trend-reading, .trend-dates {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.trend-heading h3 {margin: 0; font-size: 1.08rem;}
.trend-heading span, .trend-axis, .trend-dates, .trend-reading span {
  color: var(--muted);
  font-size: .85rem;
}
.trend-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  margin: 22px 4px 12px 0;
}
.trend-axis, .trend-plot {position: relative; height: clamp(130px, 25vw, 170px);}
.trend-axis {display: grid; text-align: right;}
.trend-axis span {grid-area: 1/1; position: relative; align-self: start; transform: translateY(-50%);}
.trend-plot {cursor: crosshair; touch-action: pan-y;}
.trend-rule, .trend-guide, .trend-dot, .trend-selected, .trend-plot svg {
  position: absolute;
  pointer-events: none;
}
.trend-rule {left: 0; right: 0; border-top: 1px dashed var(--line);}
.trend-plot svg {inset: 0; width: 100%; height: 100%; overflow: visible;}
.trend-plot path {fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;}
.trend-dot, .trend-selected {
  width: 5px; height: 5px; background: var(--accent);
  border-radius: 50%; transform: translate(-50%, -50%);
}
.trend-selected {width: 11px; height: 11px; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--accent);}
.trend-guide {top: 0; bottom: 0; border-left: 1px dashed var(--muted);}
.trend-dates {grid-column: 2; line-height: 1.3;}
.trend-reading {flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line);}
.trend-reading strong {color: var(--accent);}
.trend-records {margin-top: 10px; font-size: .9rem;}
.trend-records summary {cursor: pointer; width: fit-content; padding: 6px 0;}
.trend-empty {margin-top: 12px; color: var(--muted);}
.summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
}
.reason {
  background: var(--wash);
}
.pending {
  color: var(--muted);
  font-size: 0.83rem;
}
.themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-tile {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px;
  text-align: left;
}
.theme-tile[aria-pressed="true"] {
  outline: 2px solid var(--accent);
}
.swatch {
  height: 64px;
  border-radius: 6px;
  display: block;
  background: linear-gradient(
    95deg,
    #efede1 50%,
    #a75938 50%,
    #a75938 70%,
    #3b5546 70%
  );
  margin-bottom: 7px;
}
.lab {
  background: linear-gradient(
    0deg,
    #d7eafa 40%,
    #2354a4 40%,
    #2354a4 57%,
    #f4f9ff 57%
  );
}
.noir {
  background: linear-gradient(
    125deg,
    #19252c 50%,
    #54746c 50%,
    #54746c 76%,
    #e8c895 76%
  );
}
#tray {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 6px 8px 6px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  border-radius: 13px;
  z-index: 3;
  white-space: nowrap;
}
:root[data-theme="lab"] {
  --bg: #eff5fa;
  --paper: #fff;
  --ink: #172e4a;
  --muted: #475d75;
  --accent: #255c9c;
  --cta: #244e86;
  --line: #cad9e7;
  --wash: #e2eef9;
  --radius: 5px;
}
.lab-note {
  font-family: monospace;
}
[data-theme="lab"] h1 {
  font-family: "Segoe UI", "Microsoft JhengHei", sans-serif;
  letter-spacing: -0.035em;
}
[data-theme="lab"] .hero {
  grid-template-columns: 1.15fr 1fr;
  border-top: 5px solid var(--accent);
}
[data-theme="lab"] .card {
  border-radius: 4px;
}
[data-theme="lab"] .products {
  gap: 10px;
}
:root[data-theme="noir"] {
  color-scheme: dark;
  --bg: #172226;
  --paper: #202e31;
  --ink: #f3ede1;
  --muted: #b8c8c2;
  --accent: #e3bd89;
  --cta: #e3bd89;
  --button-ink: #272921;
  --line: #435650;
  --wash: #334440;
  --radius: 14px;
}
[data-theme="noir"] .hero-photo {
  grid-column: 1;
  grid-row: 1;
}
[data-theme="noir"] .editorial {
  grid-column: 2;
  grid-row: 1;
}
[data-theme="noir"] .hero-photo img {
  filter: brightness(0.82);
}
@media (max-width: 900px) {
  .navwrap,
  main {
    width: 94%;
  }
  .editorial {
    padding: 25px;
  }
  .navwrap {
    gap: 24px;
  }
  .navwrap nav {
    gap: 18px;
  }
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: 1.15fr 1fr;
  }
  .field {
    gap: 6px;
    padding: 8px;
  }
  .field > i {
    display: none;
  }
}
@media (max-width: 660px) {
  .navwrap {
    flex-wrap: wrap;
    gap: 0;
    padding-top: 9px;
    width: 92%;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .brand span {
    font-size: 1.18rem;
  }
  .appearance {
    margin-left: auto;
    min-height: 40px;
  }
  .navwrap nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    margin: 4px 0 0;
  }
  .navwrap nav a,
  .navwrap nav button {
    min-height: 42px;
    padding: 0 4px;
  }
  .hero,
  [data-theme="lab"] .hero {
    grid-template-columns: 1fr;
    margin: 16px 0 26px;
  }
  .editorial,
  [data-theme="noir"] .editorial {
    grid-area: auto;
    padding: 20px;
  }
  .hero-photo,
  [data-theme="noir"] .hero-photo {
    grid-area: auto;
    height: 168px;
    min-height: 0;
  }
  .hero-photo img {
    object-position: 50% 51%;
  }
  .hero-photo figcaption {
    bottom: 9px;
    left: 12px;
  }
  .market {
    font-size: 0.75rem;
  }
  h1 {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    margin: 9px 0 15px;
  }
  .question {
    font-size: 1.15rem;
  }
  .section-head {
    align-items: center;
    margin: 0;
  }
  .section-head h2 {
    font-size: 1.5rem;
  }
  .sort {
    gap: 4px;
    padding: 6px 8px;
  }
  .sort select {
    font-size: 0.83rem;
  }
  .products {
    gap: 10px;
  }
  .product-image {
    height: 145px;
  }
  .card-body {
    padding: 12px;
    gap: 6px;
  }
  .card h3 {
    font-size: 1.08rem;
  }
  .tags {
    gap: 4px;
  }
  .tag {
    font-size: 0.74rem;
    padding: 2px 5px;
  }
  .card-bottom {
    align-items: stretch;
    flex-direction: column;
  }
  .brandline {
    font-size: 0.72rem;
  }
  .price {
    font-size: 1.08rem;
  }
  .compare-btn,
  .linklike {
    min-height: 40px;
  }
  .theme-tile {
    font-size: 0.85rem;
  }
  .themes,
  .stats {
    gap: 6px;
  }
  .summary {
    align-items: start;
    font-size: 0.9rem;
  }
  .filters {
    gap: 6px;
  }
  .chip {
    min-height: 40px;
  }
  .detail-links {
    gap: 10px;
  }
}
@media (max-width: 360px) {
  .products {
    grid-template-columns: 1fr;
  }
  .editorial {
    padding: 16px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .fieldrow {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
  }
}
.compare-wrap th,
.compare-wrap td {
  min-width: 8rem;
}
.compare-wrap td {
  max-width: 16rem;
}
@media (min-width: 900px) {
  [data-theme="lab"] .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-theme="lab"] .card {
    display: grid;
    grid-template-columns: 34% 1fr;
  }
  [data-theme="lab"] .product-image {
    height: 100%;
    min-height: 200px;
    background: #e8eef4;
  }
  [data-theme="lab"] .card h3 {
    font-size: 1.15rem;
  }
}
