:root {
  color-scheme: dark;
  --bg: #17120d;
  --surface: #231a12;
  --paper: #f6f0e4;
  --ink: #21170f;
  --gold: #e4b64e;
  --gold-light: #ffe5a0;
  --red: #9f281d;
  --line: rgba(255, 229, 160, .2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: #fff9ee;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}
button { font: inherit; }

main { min-height: 100vh; }
.profile {
  width: min(100%, 660px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(52px, env(safe-area-inset-top)) 22px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.profile-character {
  width: clamp(190px, 42vw, 270px);
  max-height: 300px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .34));
}
.eyebrow {
  margin: 22px 0 7px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 18px 0 12px;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 1;
  color: var(--gold-light);
}
.intro {
  max-width: 520px;
  margin-bottom: 30px;
  color: #d9cdbb;
  line-height: 1.8;
}
.link-list {
  width: 100%;
  display: grid;
  gap: 12px;
}
.link-button {
  width: 100%;
  min-height: 68px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.link-button:hover, .link-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold);
  outline: none;
}
.button-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.button-main > span:last-child { font-size: 1.08rem; font-weight: 850; }
.button-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(82, 57, 24, .18);
  background: #21170f;
  color: var(--gold-light);
  font-size: .88rem;
  font-weight: 900;
}
.button-icon--mascot { background: #321810; object-position: center 32%; }
.button-main img[src*="betel-product"] { object-position: 50% 57%; }
.button-main img[src*="chicken-soup"] { object-position: 50% 60%; }
.button-icon--community { background: var(--red); color: #fff3dd; }
.button-icon--community { position: relative; overflow: visible; }
.button-icon--community img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  background: #2a1b13;
}
.button-icon--community i {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: #e13a2e;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.button-icon--catalog {
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
}
.button-icon--catalog img {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
}
.button-icon--catalog img:first-child { left: 0; top: 1px; object-position: 50% 60%; }
.button-icon--catalog img:last-child { right: 0; bottom: 1px; object-position: 50% 57%; }
.link-button--accent {
  background: var(--gold);
  color: #1b1209;
  border-color: var(--gold);
}

.products {
  background: var(--paper);
  color: var(--ink);
  padding: 76px max(22px, calc((100vw - 1120px) / 2)) 88px;
}
.products[hidden] { display: none; }
.section-heading { max-width: 680px; margin-bottom: 42px; }
.section-heading .eyebrow { margin-top: 0; color: var(--red); }
.section-heading h2 {
  margin-bottom: 12px;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.section-heading > p:last-child { color: #64594f; line-height: 1.8; }
.product-card, .brand-card {
  margin-bottom: 28px;
  border-top: 1px solid #c9b99e;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-top: 28px;
}
.product-card--reverse { grid-template-columns: minmax(320px, 1.2fr) minmax(0, .8fr); }
.product-card--reverse .product-copy { order: 2; }
.product-card img, .brand-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.product-copy { padding: 12px 0; }
.product-no { margin-bottom: 8px; color: var(--red); font-weight: 900; }
.product-copy h3, .brand-card h3 {
  margin-bottom: 16px;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
}
.product-copy > p:not(.product-no), .brand-card div > p:last-child { color: #5e5145; line-height: 1.85; }
.product-copy ul { margin: 20px 0 0; padding: 0; list-style: none; }
.product-copy li { padding: 10px 0; border-bottom: 1px solid #d8cbb8; font-weight: 800; }
.brand-card { grid-template-columns: minmax(320px, 1.15fr) minmax(0, .85fr); }
.back-button {
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid #3e3024;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(calc(100% - 32px), 430px);
  transform: translateX(-50%);
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 4px;
  background: #050403;
  box-shadow: 0 12px 36px rgba(0,0,0,.34);
  color: #fff;
  text-align: center;
}

@media (max-width: 720px) {
  .profile { justify-content: flex-start; min-height: auto; padding-top: 56px; padding-bottom: 62px; }
  .profile-character { width: min(72vw, 250px); max-height: 270px; }
  .products { padding-top: 56px; padding-bottom: 64px; }
  .product-card, .product-card--reverse, .brand-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-card--reverse .product-copy { order: 0; }
  .product-card img, .brand-card img { max-height: none; }
  .link-button { min-height: 72px; padding: 11px 14px; gap: 10px; }
  .button-main { gap: 11px; }
  .button-main > span:last-child { font-size: 1rem; }
  .button-icon { flex-basis: 40px; width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link-button { transition: none; }
}
