:root {
  --brand-primary: #79513a;
  --brand-primary-strong: #3e3832;
  --brand-accent: #a76f4a;
  --brand-sage: #788071;
  --brand-surface: #f7f3ec;
  --brand-surface-raised: #fffdf9;
  --brand-surface-accent: #e8ded1;
  --brand-surface-soft: #efe7dc;
  --brand-surface-overlay: rgb(255 253 249 / 92%);
  --brand-text: #3e3832;
  --brand-text-muted: #665d55;
  --brand-border: #c7ad92;
  --brand-control-border: #786a5e;
  --brand-focus: #286d65;
  --font-family-sans:
    'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', ui-sans-serif, system-ui, sans-serif;
  --font-family-serif:
    'Noto Serif TC', 'Songti TC', 'PMingLiU', ui-serif, Georgia, 'Times New Roman', serif;
  --font-family-display: 'DM Serif Display', var(--font-family-serif);
  --font-size-body: 1rem;
  --line-height-body: 1.7;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --radius-small: 0.25rem;
  --radius-medium: 0.75rem;
  --radius-large: 1rem;
  --shadow-soft: 0 1.25rem 3.5rem rgb(62 56 50 / 10%);
  --shadow-header: 0 0.5rem 2rem rgb(62 56 50 / 7%);
  --content-max-width: 80rem;
  --control-min-size: 2.75rem;
}

@font-face {
  font-family: 'TailTable Hand';
  src: url('/assets/tailtable-hand.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  font-family: 'TailTable Hand', 'DFKai-SB', serif;
  font-size: 18px;
  font-synthesis: none;
  color: var(--brand-text);
  background: var(--brand-surface);
  line-height: 1.8;
}
body {
  margin: 0;
  overflow-wrap: anywhere;
}
a {
  color: inherit;
  text-underline-offset: 0.25em;
}
a:focus-visible,
main:focus-visible {
  outline: 3px solid var(--brand-focus);
  outline-offset: 5px;
}
.frame {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 2;
  padding: 12px;
  background: white;
}
.skip-link:focus {
  top: 8px;
}
header {
  border-bottom: 1px solid var(--brand-border);
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand svg {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}
.brand img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
svg circle,
svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.brand strong {
  display: block;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
}
.brand small {
  display: block;
  letter-spacing: 0.16em;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
nav a {
  padding-block: 10px;
}
h1,
h2,
h3 {
  line-height: 1.4;
  font-family: inherit;
  font-weight: 400;
}
h1 {
  font-size: clamp(2rem, 4.5vw, 3.7rem);
  margin: 16px 0 24px;
}
h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}
h3 {
  font-size: 1.35rem;
  margin: 12px 0 8px;
}
p {
  white-space: pre-line;
}
.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.17em;
  color: var(--brand-text-muted);
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 8%;
  padding: 72px 0 56px;
}
.hero p {
  max-width: 40em;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  margin-top: 12px;
  background: var(--brand-primary-strong);
  color: var(--brand-surface);
  text-decoration: none;
  border-radius: 4px;
}
.brand-art {
  display: grid;
  place-items: center;
  align-content: center;
  aspect-ratio: 1;
  background: var(--brand-surface-accent);
  border-radius: 50% 50% 8px 8px;
  color: var(--brand-primary);
}
.brand-art svg {
  width: 60%;
  max-width: 240px;
}
.brand-art span {
  font-size: 1.25rem;
  letter-spacing: 0.15em;
}
.brand-art--logo {
  border-radius: 0;
  background: none;
}
.brand-art--logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.section {
  padding: 48px 0 72px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-heading h2 {
  margin: 8px 0 24px;
}
.section-heading > a {
  margin-bottom: 24px;
}
.category {
  margin-top: 48px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  list-style: none;
  padding: 0;
}
.product-card {
  display: block;
  height: 100%;
  text-decoration: none;
  background: var(--brand-surface-raised);
}
.product-card > div {
  padding: 24px;
}
figure {
  margin: 0;
  min-width: 0;
}
figcaption {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--brand-text-muted);
}
.product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
}
.text-link {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 32px;
}
.product-detail figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.product-detail h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
}
dt {
  font-weight: 700;
  margin-top: 16px;
}
dd {
  margin-left: 0;
  white-space: pre-line;
}
.availability {
  border-top: 1px solid var(--brand-border);
  padding-top: 24px;
}
.reading {
  max-width: 760px;
  min-height: 55vh;
}
.empty {
  padding: 48px 24px;
  background: var(--brand-surface-accent);
}
.preview-notice {
  text-align: center;
  background: var(--brand-primary-strong);
  color: var(--brand-surface);
  padding: 8px;
  font-size: 0.875rem;
}
footer {
  border-top: 1px solid var(--brand-border);
  background: var(--brand-surface-accent);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-block: 48px;
}
.footer nav {
  align-content: start;
}
.footer p {
  margin: 6px 0;
}
@media (max-width: 760px) {
  .frame {
    width: calc(100% - 32px);
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-block: 16px;
  }
  nav {
    gap: 8px 20px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 40px;
  }
  .brand-art {
    max-width: 360px;
    width: 100%;
    justify-self: center;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .product-card > div {
    padding: 16px;
  }
  .product-detail {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0;
  }
  .footer {
    flex-direction: column;
  }
}
@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
