:root {
  --paper: #f2f2f0;
  --paper-deep: #e8e8e5;
  --paper-warm: #e9e3d7;
  --ink: #1a1410;
  --ink-soft: #5d5349;
  --rule: #c8c8c3;
  --accent: #f5c518;
  --serif: "Instrument Serif", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: "IBM Plex Sans", "PingFang SC", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mono { font-family: var(--mono); letter-spacing: .12em; font-size: 10px; }
.label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  width: min(100%, var(--max));
  min-height: 71px;
  margin: 0 auto;
  padding: 18px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav .brand { justify-self: start; display: flex; align-items: center; }
.nav .brand img { display: block; width: auto; height: 34px; }
.nav .links { display: flex; gap: 28px; color: var(--ink-soft); }
.nav .links a { padding: 6px 0; font-size: 15px; }
.nav .links a:hover { color: var(--ink); }
.nav .right { justify-self: end; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  white-space: nowrap;
}
.cta:hover { background: var(--accent); color: var(--ink); }
.cta:active { transform: scale(.98); }

.hero {
  width: min(100%, var(--max));
  min-height: 640px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) 32px clamp(72px, 8vw, 112px);
  border-bottom: 1px solid var(--ink);
}
.hero-meta { display: flex; align-items: baseline; gap: 12px; color: var(--ink-soft); }
.hero-meta > span:last-child { color: var(--ink); font-size: 14px; font-weight: 500; }
.hero-headline {
  margin: clamp(34px, 4vw, 56px) 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.hero-headline .it { color: color-mix(in oklab, var(--ink) 75%, var(--accent)); font-style: italic; }
.hero-headline .amp { color: var(--accent); font-style: italic; }
.hero-zh {
  margin: clamp(24px, 2.4vw, 36px) 0 0;
  color: var(--ink-soft);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(18px, 1.7vw, 26px);
  font-weight: 500;
  letter-spacing: .08em;
}
.hero-bottom { display: flex; justify-content: flex-end; margin-top: clamp(56px, 7vw, 96px); }
.hero-manifesto { width: min(100%, 620px); margin-left: auto; text-align: right; }
.hero-manifesto blockquote {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(22px, 2.35vw, 36px);
  font-weight: 500;
  line-height: 1.38;
}
.hero-manifesto .hl {
  padding: 0 .05em;
  background: linear-gradient(transparent 64%, color-mix(in oklab, var(--accent) 70%, transparent) 64%, color-mix(in oklab, var(--accent) 70%, transparent) 92%, transparent 92%);
}
.hero-en { margin: 14px 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: clamp(17px, 1.5vw, 22px); font-style: italic; line-height: 1.4; }
.hero-facts { margin: 38px 0 0 auto; border-top: 1px solid var(--rule); text-align: left; }
.hero-facts div { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.hero-facts dt { color: var(--ink-soft); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; }
.hero-facts dd { margin: 0; font-size: 13px; }

main { width: min(100%, var(--max)); margin: 0 auto; padding: 0 32px 120px; }
#coffees, #about, #order-panel { scroll-margin-top: 92px; }

.notice { margin: 24px 0 0; padding: 24px; border: 1px solid var(--ink); background: var(--accent); }
.notice-kicker { margin: 0 0 8px; }
.notice h2 { margin: 0; font-family: var(--serif); font-size: 32px; font-weight: 400; }
.notice p:last-child { margin: 5px 0 0; }

.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 64px; padding-top: 86px; align-items: start; }
.catalog-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 34%); gap: 40px; align-items: end; padding-bottom: 30px; border-bottom: 1px solid var(--ink); }
.catalog-kicker { margin: 0 0 18px; color: var(--ink-soft); }
.catalog-heading h2 { max-width: 8ch; margin: 0; font-family: var(--serif); font-size: clamp(58px, 6.4vw, 92px); line-height: .78; letter-spacing: -.035em; font-weight: 400; }
.catalog-heading h2 em { color: color-mix(in oklab, var(--ink) 78%, var(--accent)); font-weight: 400; }
.catalog-summary { display: grid; gap: 34px; }
.catalog-summary p { max-width: 30ch; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.catalog-summary .catalog-count { display: flex; justify-content: space-between; align-items: baseline; max-width: none; padding-top: 12px; border-top: 1px solid var(--rule); }
.catalog-count span { color: var(--ink); font-family: var(--serif); font-size: 34px; letter-spacing: -.02em; }
.catalog-state { padding: 16px 0; color: var(--ink-soft); font-size: 13px; }
.catalog-state.error { color: #7b2f20; }
.product-list {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
}

.product-card {
  display: grid;
  grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
  min-height: 390px;
  padding: 28px 0;
  gap: clamp(26px, 4vw, 52px);
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 20px;
}
.product-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(260px, 42%); }
.product-card:nth-child(even) .product-image { grid-column: 2; grid-row: 1; }
.product-card:nth-child(even) .product-info { grid-column: 1; grid-row: 1; }
.product-image { width: 100%; aspect-ratio: 1; align-self: start; background: var(--paper-deep); display: grid; place-items: center; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.16, 1, .3, 1); }
.product-card:hover .product-image img { transform: scale(1.025); }
.product-info { min-width: 0; display: flex; flex-direction: column; }
.product-topline { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); }
.stock-label { padding: 4px 0 4px 12px; border-left: 1px solid var(--accent); line-height: 1; }
.stock-label.sold-out { border-left-color: var(--rule); color: var(--ink-soft); }
.product-info h3 { margin: clamp(32px, 4vw, 54px) 0 12px; font-family: var(--serif); font-size: clamp(42px, 4.25vw, 62px); line-height: .84; letter-spacing: -.035em; font-weight: 400; text-wrap: balance; }
.product-info h3 span { display: block; margin-top: 8px; color: var(--ink-soft); font-size: .55em; font-style: italic; line-height: 1; }
.origin { max-width: 42ch; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.quick-facts { margin: 10px 0 0; font-family: var(--mono); color: var(--ink-soft); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.flavor-block { margin-top: 28px; }
.flavor-label { margin: 0 0 9px; color: var(--ink-soft); }
.product-details { margin-top: 20px; border-top: 1px solid var(--rule); }
.product-details summary { display: flex; justify-content: space-between; align-items: center; min-height: 38px; color: var(--ink-soft); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; cursor: pointer; list-style: none; }
.product-details summary::-webkit-details-marker { display: none; }
.product-details summary span:last-child { font-size: 14px; transition: transform .2s ease; }
.product-details[open] summary span:last-child { transform: rotate(45deg); }
.details { margin: 0; border-top: 1px solid var(--rule); }
.details div { display: grid; grid-template-columns: 60px 1fr; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.details dt { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--ink-soft); text-transform: uppercase; }
.details dd { margin: 0; font-size: 11px; }
.flavors { display: flex; flex-wrap: wrap; gap: 0; }
.flavors span { display: inline-flex; align-items: center; font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.flavors span:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--accent); font-family: var(--sans); }
.flavors .flavor-more { color: var(--ink-soft); font-family: var(--mono); font-size: 9px; }
.all-flavors { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-top: 8px; color: var(--ink-soft); font-size: 10px; }
.sku-choice { display: grid; grid-template-columns: 60px 1fr; gap: 9px; align-items: center; margin-top: 10px; }
.sku-choice select { width: 100%; min-height: 34px; border: 1px solid var(--rule); border-radius: 0; background: var(--paper); color: var(--ink); padding: 0 10px; font: 13px var(--sans); }
.buy-row { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.price { grid-column: 1 / -1; font-family: var(--serif); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); }
.quantity { height: 38px; display: inline-grid; grid-template-columns: 32px 26px 32px; border: 1px solid var(--ink); }
.quantity button { appearance: none; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.quantity button:hover:not(:disabled) { background: var(--paper-deep); }
.quantity button:disabled { opacity: .3; cursor: not-allowed; }
.quantity output { display: grid; place-items: center; font-family: var(--mono); font-size: 11px; }
.add-button, .checkout-button {
  appearance: none; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  min-height: 38px; padding: 0 16px; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.add-button:hover:not(:disabled), .checkout-button:hover:not(:disabled) { background: var(--accent); color: var(--ink); }
.add-button:active:not(:disabled), .checkout-button:active:not(:disabled) { transform: translateY(1px); }
.add-button:disabled, .checkout-button:disabled { cursor: not-allowed; background: var(--paper-deep); color: var(--ink-soft); border-color: var(--rule); }
.product-skeleton { height: 300px; border-bottom: 1px solid var(--rule); background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.45) 42%, transparent 60%) var(--paper-deep); background-size: 220% 100%; animation: shimmer 1.5s infinite; }
.catalog-empty { grid-column: 1 / -1; min-height: 420px; display: grid; place-content: center; justify-items: center; text-align: center; border-bottom: 1px solid var(--ink); color: var(--ink-soft); }
.catalog-empty > span { font-family: var(--serif); font-size: 54px; color: var(--rule); }
.catalog-empty h3 { margin: 8px 0 4px; font-family: var(--serif); font-size: 30px; font-weight: 400; color: var(--ink); }
.catalog-empty p { margin: 0; }
@keyframes shimmer { to { background-position-x: -220%; } }

.order-panel { position: sticky; top: 92px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper); }
.order-toggle { width: 100%; padding: 22px 0; border: 0; border-bottom: 1px solid var(--rule); background: transparent; text-align: left; display: flex; justify-content: space-between; align-items: end; cursor: default; }
.order-toggle > span:first-child { display: flex; flex-direction: column; gap: 5px; }
.order-toggle strong { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.order-toggle-total { display: flex; gap: 10px; font-family: var(--mono); font-size: 10px; }
.order-toggle-total span:last-child { display: none; }
.order-body { padding: 20px 0 24px; }
.cart-empty { min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: var(--ink-soft); }
.cart-empty[hidden] { display: none; }
.cart-empty > span { font-family: var(--serif); font-size: 44px; color: var(--rule); }
.cart-empty p { margin: 7px 0 5px; }
.cart-empty small { max-width: 260px; line-height: 1.5; }
.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.cart-item strong { font-family: var(--serif); font-size: 20px; font-weight: 400; }
.cart-item small { color: var(--ink-soft); }
.cart-item-controls { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: 9px; }
.cart-item-controls button { appearance: none; width: 26px; height: 26px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; cursor: pointer; }
.cart-totals { margin-top: 22px; }
.cart-totals > div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.cart-totals .total { border-top: 1px solid var(--ink); margin-top: 8px; padding-top: 14px; font-size: 16px; }
.cart-totals .total strong { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.quote-status { min-height: 38px; margin: 12px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.quote-status.error { color: #7b2f20; }
.checkout-button { width: 100%; min-height: 50px; display: flex; justify-content: space-between; align-items: center; }
.checkout-note { margin: 13px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }

footer { padding: 72px 0 32px; border-top: 1px solid var(--rule); background: var(--paper-deep); color: var(--ink); }
.ftr-grid { width: min(100%, var(--max)); margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 72px; }
.ftr-grid h2 { margin: 0 0 20px; color: var(--ink-soft); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.ftr-grid p { max-width: 50ch; margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.ftr-grid p + p { margin-top: 12px; }
.ftr-grid ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ftr-grid ul a { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.ftr-grid ul a:hover { color: color-mix(in oklab, var(--ink) 60%, var(--accent)); }
.ftr-grid .ic { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.ftr-bottom { width: min(100%, var(--max)); margin: 72px auto 0; padding: 32px 32px 0; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; color: var(--ink-soft); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.ftr-logo { display: block; width: 60px; height: 60px; object-fit: contain; flex: 0 0 auto; }
.noscript { position: fixed; inset: auto 16px 16px; background: var(--accent); padding: 14px; border: 1px solid var(--ink); }

@media (max-width: 1320px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
  .product-card, .product-card:nth-child(even) { grid-template-columns: minmax(210px, 38%) minmax(0, 1fr); min-height: 340px; gap: 28px; }
  .product-card:nth-child(even) .product-image { grid-column: 1; }
  .product-card:nth-child(even) .product-info { grid-column: 2; }
  .product-info h3 { font-size: 38px; }
  .buy-row { grid-template-columns: 1fr auto auto; }
  .price { grid-column: auto; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); overflow-x: hidden; }
  .nav-inner { min-height: 62px; padding: 12px 20px; grid-template-columns: auto 1fr auto; gap: 14px; }
  .nav .brand img { height: 30px; }
  .nav .links { justify-self: center; gap: 14px; }
  .nav .links a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }
  .cta { min-height: 44px; padding: 0 12px; font-size: 10px; }
  .hero { min-height: 600px; padding: 36px 20px 64px; }
  .hero-headline { max-width: 100%; margin-top: 42px; font-size: clamp(36px, 11.5vw, 54px); }
  .hero-zh { margin-top: 28px; font-size: 20px; line-height: 1.5; }
  .hero-bottom { margin-top: 64px; }
  .hero-manifesto blockquote { font-size: 25px; line-height: 1.42; }
  .hero-en { margin-top: 16px; font-size: 18px; }
  .hero-facts { margin-top: 32px; }
  main { padding: 0 20px 80px; }
  .shop-layout { display: block; padding-top: 58px; }
  .catalog-heading { grid-template-columns: 1fr; gap: 30px; padding-bottom: 24px; }
  .catalog-kicker { margin-bottom: 14px; }
  .catalog-heading h2 { max-width: none; font-size: 54px; line-height: .84; }
  .catalog-summary { grid-template-columns: 1fr auto; align-items: end; gap: 22px; }
  .catalog-summary p:first-child { font-size: 12px; }
  .catalog-summary .catalog-count { display: block; min-width: 64px; padding-top: 8px; text-align: right; }
  .catalog-count span { display: block; font-size: 30px; }
  .product-list { grid-template-columns: 1fr; }
  .product-card, .product-card:nth-child(even) { grid-template-columns: 1fr; min-height: 0; padding: 24px 0 30px; gap: 0; }
  .product-card:nth-child(even) .product-image, .product-card:nth-child(even) .product-info { grid-column: 1; }
  .product-card:nth-child(even) .product-image { grid-row: 1; }
  .product-card:nth-child(even) .product-info { grid-row: 2; }
  .product-image { width: 100%; height: auto; aspect-ratio: 1; }
  .product-info { padding: 22px 4px 0; }
  .product-topline { flex-wrap: wrap; }
  .product-info h3 { margin-top: 38px; font-size: 48px; }
  .flavor-block { margin-top: 26px; }
  .flavors span { font-size: 20px; }
  .product-details { margin-top: 22px; }
  .buy-row { grid-template-columns: 1fr auto; }
  .price { grid-column: 1 / -1; }
  .sku-choice select { min-height: 48px; }
  .quantity { height: 48px; grid-template-columns: 44px 32px 44px; }
  .quantity button { min-width: 44px; min-height: 44px; }
  .add-button { grid-column: 1 / -1; width: 100%; min-height: 48px; }
  .product-skeleton { height: 660px; }
  .order-panel { position: fixed; z-index: 20; inset: auto 0 0; max-height: calc(100dvh - 62px); overflow: hidden; border-top: 1px solid var(--ink); border-bottom: 0; box-shadow: 0 -12px 35px rgba(26,20,16,.12); padding: 0 20px env(safe-area-inset-bottom); }
  .order-toggle { padding: 14px 0; cursor: pointer; }
  .order-toggle strong { font-size: 22px; }
  .order-toggle-total span:last-child { display: inline; transition: transform .2s ease; }
  .order-body { display: none; max-height: calc(100dvh - 142px - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: 12px; }
  .order-panel.expanded .order-body { display: block; }
  .order-panel.expanded .order-toggle-total span:last-child { transform: rotate(180deg); }
  .cart-empty { min-height: 130px; }
  .cart-item-controls button { width: 44px; height: 44px; }
  footer { padding: 56px 0 calc(120px + env(safe-area-inset-bottom)); }
  .ftr-grid, .ftr-bottom { padding-left: 20px; padding-right: 20px; }
  .ftr-grid { grid-template-columns: 1fr; gap: 42px; }
  .ftr-bottom { margin-top: 52px; flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 390px) {
  .nav-inner { gap: 10px; padding-inline: 14px; }
  .nav .brand img { height: 27px; }
  .nav .links { gap: 10px; }
  .nav .links a { font-size: 11px; }
  .nav .links a[href="#about"] { display: none; }
  .cta { padding-inline: 10px; }
  .hero { padding-inline: 16px; }
  main { padding-inline: 16px; }
  .product-info h3 { font-size: 42px; }
  .price { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
