@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Serif+SC:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #172018;
  --muted: #697068;
  --paper: #f2efe8;
  --paper-soft: #f8f6f0;
  --card: #fffdfa;
  --line: #d8d5cc;
  --green: #173f32;
  --green-soft: #dbe5dc;
  --lime: #dfe96e;
  --orange: #dc6b42;
  --danger: #9f3d2d;
  --serif: "Noto Serif SC", Georgia, serif;
  --sans: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 18px 50px rgba(24, 37, 27, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef3ed;
  --muted: #a9b1aa;
  --paper: #111713;
  --paper-soft: #171e19;
  --card: #202821;
  --line: #3a443c;
  --green-soft: #294538;
  --orange: #f18a62;
  --danger: #f29a88;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

html[data-interface-transition="true"] body {
  pointer-events: none;
}

html[data-theme-transition="true"],
html[data-theme-transition="true"] body,
html[data-theme-transition="true"] .site-header,
html[data-theme-transition="true"] .brand,
html[data-theme-transition="true"] .brand-mark,
html[data-theme-transition="true"] .header-nav,
html[data-theme-transition="true"] .header-nav > a,
html[data-theme-transition="true"] .preference-button,
html[data-theme-transition="true"] .text-link,
html[data-theme-transition="true"] .hero-card,
html[data-theme-transition="true"] .hero-description,
html[data-theme-transition="true"] .collection,
html[data-theme-transition="true"] .collection-intro,
html[data-theme-transition="true"] .tab,
html[data-theme-transition="true"] .tab > span[id$="-tab-count"],
html[data-theme-transition="true"] .search-field input,
html[data-theme-transition="true"] .coffee-card,
html[data-theme-transition="true"] .coffee-roaster,
html[data-theme-transition="true"] .coffee-meta,
html[data-theme-transition="true"] .coffee-notes,
html[data-theme-transition="true"] .flavor-list span,
html[data-theme-transition="true"] .like-button,
html[data-theme-transition="true"] .source-link,
html[data-theme-transition="true"] .ritual,
html[data-theme-transition="true"] .ritual > p:last-child,
html[data-theme-transition="true"] .site-footer,
html[data-theme-transition="true"] .footer-brand .brand-mark {
  transition:
    background-color 480ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 420ms ease,
    box-shadow 480ms cubic-bezier(0.22, 1, 0.36, 1),
    color 380ms ease;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.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;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1240px, calc(100% - 64px));
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--green);
  font-size: 1.17rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50% 50% 46% 54% / 62% 62% 38% 38%;
  background: var(--green);
  color: var(--paper-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  transform: rotate(-12deg);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-nav > a {
  color: #4d554e;
  font-size: 0.9rem;
  text-decoration: none;
}

.preferences {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.preference-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.58);
}

.preference-button {
  min-width: 42px;
  padding: 0 0.7rem;
  color: #535b54;
  font-size: 0.7rem;
  font-weight: 700;
}

.theme-toggle {
  display: grid;
  width: 42px;
  min-width: 42px;
  padding: 0;
  place-items: center;
}

.theme-icon {
  display: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

html[data-theme="light"] .theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.preference-button:hover {
  background: var(--card);
}

.preference-button:focus-visible {
  outline: 3px solid rgba(220, 107, 66, 0.28);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.67rem 1.15rem;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
.tab:focus-visible,
.text-link:focus-visible {
  outline: 3px solid rgba(220, 107, 66, 0.28);
  outline-offset: 3px;
}

.button-dark {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 22px rgba(23, 63, 50, 0.15);
}

.button-dark:hover {
  box-shadow: 0 12px 26px rgba(23, 63, 50, 0.22);
}

.button-light {
  border-color: var(--line);
  background: var(--card);
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
}

.button-danger {
  border-color: rgba(159, 61, 45, 0.25);
  color: var(--danger);
}

.hero {
  display: grid;
  width: min(1240px, calc(100% - 64px));
  min-height: 650px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.72fr);
  gap: clamp(3rem, 9vw, 9rem);
  align-items: center;
  padding: 5.7rem 0 6.5rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--orange);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.25rem, 5.3vw, 5.7rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1.17;
}

.hero h1 em {
  color: var(--orange);
  font-style: normal;
}

.hero-description {
  max-width: 570px;
  margin: 1.75rem 0 2rem;
  color: #646b64;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.9;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid #9b9e96;
  padding-bottom: 0.35rem;
  color: var(--green);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 465px;
  border-radius: 2px;
  padding: 1.5rem;
  background: var(--green);
  color: white;
  box-shadow: 30px 34px 0 #dfe3d5;
}

.hero-card::before {
  position: absolute;
  z-index: 0;
  top: 77px;
  right: -58px;
  width: 185px;
  height: 185px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.hero-card-top,
.hero-stat-primary,
.hero-mini-stats {
  position: relative;
  z-index: 1;
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.hero-card-top p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #dbe9df;
  font-size: 0.67rem;
  text-transform: uppercase;
}

.live-dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  content: "";
  box-shadow: 0 0 0 4px rgba(223, 233, 110, 0.1);
}

.hero-stat-primary {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.hero-stat-primary strong {
  font-family: Georgia, serif;
  font-size: 4.6rem;
  font-weight: 400;
  line-height: 1;
}

.hero-stat-primary span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

.hero-card-visual {
  position: absolute;
  right: 1.5rem;
  bottom: 6rem;
  left: 1.5rem;
  height: 190px;
  overflow: hidden;
  background: #d9dfc9;
}

.hero-card-visual::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(23, 63, 50, 0.12) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(23, 63, 50, 0.12) 50%, transparent 50.2%);
  background-size: 38px 38px;
  content: "";
}

.visual-orbit {
  position: absolute;
  top: -58px;
  right: -34px;
  width: 185px;
  height: 185px;
  border: 1px solid rgba(23, 63, 50, 0.28);
  border-radius: 50%;
}

.visual-shelf {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 22px;
  left: 0;
  height: 9px;
  border-radius: 2px;
  background: #173f32;
  box-shadow: 0 9px 0 rgba(23, 63, 50, 0.2);
}

.visual-cup {
  position: absolute;
  z-index: 4;
  bottom: 30px;
  left: 50%;
  width: 74px;
  height: 55px;
  border-radius: 5px 5px 28px 28px;
  background: #fffdf7;
  transform: translateX(-50%);
  box-shadow: 0 9px 0 -3px rgba(23, 63, 50, 0.24);
}

.visual-cup::before {
  position: absolute;
  top: 10px;
  right: -25px;
  width: 28px;
  height: 30px;
  border: 7px solid #fffdf7;
  border-left: 0;
  border-radius: 0 50% 50% 0;
  content: "";
}

.visual-cup i {
  position: absolute;
  top: 6px;
  right: 7px;
  left: 7px;
  height: 10px;
  border-radius: 50%;
  background: #7f5437;
}

.visual-steam {
  position: absolute;
  z-index: 4;
  bottom: 91px;
  width: 18px;
  height: 45px;
  border-left: 3px solid rgba(23, 63, 50, 0.58);
  border-radius: 50%;
  transform: rotate(12deg);
}

.visual-steam-one {
  left: calc(50% - 17px);
}

.visual-steam-two {
  left: calc(50% + 5px);
  height: 36px;
  transform: rotate(-10deg);
}

.visual-bean {
  position: absolute;
  z-index: 2;
  width: 40px;
  height: 55px;
  border-radius: 50% 50% 46% 54% / 62% 62% 38% 38%;
  background: #b55f3d;
  transform: rotate(32deg);
}

.visual-bean::after {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 12px;
  border-left: 2px solid rgba(255, 253, 247, 0.55);
  border-radius: 50%;
  content: "";
}

.visual-bean-one {
  bottom: 36px;
  left: 34px;
}

.visual-bean-two {
  bottom: 45px;
  left: 78px;
  width: 28px;
  height: 39px;
  background: #c8834f;
  transform: rotate(-26deg);
}

.visual-bean-three {
  right: 42px;
  bottom: 36px;
  width: 34px;
  height: 48px;
  background: #8f4934;
  transform: rotate(56deg);
}

.hero-mini-stats {
  position: absolute;
  right: 1.5rem;
  bottom: 1.45rem;
  left: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}

.hero-mini-stats p {
  display: flex;
  margin: 0;
  align-items: baseline;
  gap: 0.45rem;
}

.hero-mini-stats p + p {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding-left: 1.4rem;
}

.hero-mini-stats strong {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.hero-mini-stats span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
}

.collection {
  padding: 6.5rem max(32px, calc((100vw - 1240px) / 2)) 8rem;
  background: var(--paper-soft);
}

.collection-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 2rem;
}

.collection-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4vw, 3.45rem);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.collection-intro {
  max-width: 320px;
  margin: 0 0 0.5rem auto;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.92rem;
}

.shelf-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.2rem;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  align-self: stretch;
  gap: 2rem;
}

.tab {
  position: relative;
  border: 0;
  padding: 0.85rem 0 1.05rem;
  background: transparent;
  color: #858983;
  font-size: 0.9rem;
  font-weight: 600;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.tab.is-active {
  color: var(--green);
}

.tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.tab > span[id$="-tab-count"] {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  margin-left: 0.35rem;
  place-items: center;
  border-radius: 999px;
  background: #e5e4de;
  color: var(--muted);
  font-size: 0.68rem;
}

.tab.is-active > span[id$="-tab-count"] {
  background: var(--green-soft);
  color: var(--green);
}

.control-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.6rem;
}

.search-field {
  position: relative;
  display: block;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  width: 17px;
  fill: none;
  stroke: #7d827c;
  stroke-linecap: round;
  stroke-width: 1.6;
  transform: translateY(-50%);
}

.search-field input {
  width: 225px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 1rem 0 2.5rem;
  outline: 0;
  background: var(--card);
  font-size: 0.78rem;
}

.search-field input:focus {
  border-color: #829b8d;
  box-shadow: 0 0 0 3px rgba(23, 63, 50, 0.08);
}

.coffee-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.3rem;
  padding-top: 2rem;
}

.coffee-card {
  display: flex;
  overflow: hidden;
  min-height: 590px;
  min-width: 0;
  flex-direction: column;
  border: 1px solid #e2dfd7;
  border-radius: 3px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(22, 42, 30, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.coffee-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.coffee-card.is-rare {
  overflow: visible;
}

.coffee-art {
  --art-bg: #dce4ca;
  --art-fg: #173f32;
  position: relative;
  display: grid;
  height: 220px;
  flex: 0 0 220px;
  place-items: center;
  overflow: hidden;
  background: var(--art-bg);
  color: var(--art-fg);
}

.coffee-art[data-variant="1"] { --art-bg: #e9d0b5; --art-fg: #8c3428; }
.coffee-art[data-variant="2"] { --art-bg: #d7e3cf; --art-fg: #174b3a; }
.coffee-art[data-variant="3"] { --art-bg: #d6d9e8; --art-fg: #3f3b70; }
.coffee-art[data-variant="4"] { --art-bg: #eadba3; --art-fg: #704625; }
.coffee-art[data-variant="5"] { --art-bg: #d8c8bd; --art-fg: #593a32; }

.coffee-art[data-brand="vita"] {
  --art-bg: #1d4034;
  --art-fg: #f3e5c8;
}

.coffee-art[data-brand="dekaf"] {
  --art-bg: #ef613c;
  --art-fg: #171713;
}

.coffee-art[data-brand="verve"] {
  --art-bg: #eee7dc;
  --art-fg: #1d201d;
}

.coffee-art[data-brand="watchhouse"] {
  --art-bg: #423437;
  --art-fg: #f1e9de;
}

.coffee-art[data-brand="menottis"] {
  --art-bg: #e0ad2f;
  --art-fg: #18221d;
}

.coffee-art[data-brand="arcane"] {
  --art-bg: #202027;
  --art-fg: #e8d5a9;
}

.coffee-art[data-brand="coffee-project"] {
  --art-bg: #315d9c;
  --art-fg: #f5f0e4;
}

.coffee-art[data-brand="push-pull"] {
  --art-bg: #58c6ce;
  --art-fg: #020912;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(228, 246, 255, 0.32) 48% 50%, transparent 50%),
    var(--art-bg);
}

.coffee-art[data-brand="push-pull"] .art-ring {
  display: none;
}

.single-origin-stamp {
  position: absolute;
  z-index: 3;
  top: 0.65rem;
  right: 0.65rem;
  display: grid;
  width: 42px;
  height: 42px;
  place-content: center;
  border: 1px dashed currentColor;
  border-radius: 50%;
  background: var(--art-bg);
  font-family: var(--sans);
  font-size: 0.4rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.15;
  opacity: 0.82;
  text-align: center;
  transform: rotate(8deg);
}

.single-origin-stamp::before {
  position: absolute;
  inset: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.75;
}

.single-origin-stamp::after {
  position: absolute;
  top: 20px;
  right: 34px;
  width: 22px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  content: "";
  opacity: 0.5;
}

.single-origin-stamp span {
  position: relative;
  z-index: 1;
  display: block;
}

.single-origin-stamp[hidden] {
  display: none;
}

.art-ring {
  position: absolute;
  width: 178px;
  height: 178px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.18;
}

.art-ring::before,
.art-ring::after {
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.art-ring::before {
  inset: 15px;
}

.art-ring::after {
  inset: 38px;
}

.art-letter {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 4.8rem;
  font-weight: 400;
  line-height: 1;
  opacity: 0.9;
}

.art-brand {
  position: relative;
  z-index: 1;
  display: none;
  width: calc(100% - 2rem);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.coffee-art.has-brand .art-brand {
  display: flex;
}

.coffee-art.has-brand .art-letter {
  display: none;
}

.art-brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.art-brand-word {
  display: block;
  line-height: 0.95;
}

.art-brand-subline {
  margin-top: 0.55rem;
  opacity: 0.72;
}

.coffee-art[data-brand="vita"] .art-brand-word {
  margin: 0.25rem 0 0.1rem;
  font-family: Georgia, serif;
  font-size: 2.65rem;
  font-style: italic;
  letter-spacing: 0.03em;
}

.coffee-art[data-brand="vita"] .art-brand-word::before {
  margin-right: 0.18rem;
  content: "★";
  font-family: var(--sans);
  font-size: 0.82rem;
  vertical-align: top;
}

.coffee-art[data-brand="dekaf"] .art-brand-word {
  margin-top: 0.16rem;
  font-family: var(--sans);
  font-size: 3.05rem;
  font-weight: 700;
  letter-spacing: -0.09em;
}

.coffee-art[data-brand="verve"] .art-brand-word {
  margin: 0.32rem 0 0.05rem;
  font-family: Georgia, serif;
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.coffee-art[data-brand="watchhouse"] .art-brand-word {
  margin-top: 0.38rem;
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.coffee-art[data-brand="menottis"] .art-brand-word {
  margin: 0.3rem 0 0.05rem;
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.055em;
}

.coffee-art[data-brand="arcane"] .art-brand-word {
  margin: 0.32rem 0 0.06rem;
  font-family: Georgia, serif;
  font-size: 2.35rem;
  letter-spacing: 0.13em;
}

.coffee-art[data-brand="coffee-project"] .art-brand-word {
  max-width: 12rem;
  margin: 0.3rem 0 0.08rem;
  font-family: var(--sans);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.02;
}

.coffee-art[data-brand="push-pull"] .art-brand {
  width: 144px;
  aspect-ratio: 1;
  box-sizing: border-box;
  justify-content: space-between;
  border: 2px solid var(--art-fg);
  padding: 0.8rem 0.65rem 0.72rem;
  background: #e4f6ff;
  box-shadow: 7px 7px 0 var(--art-fg);
}

.coffee-art[data-brand="push-pull"] .art-brand small,
.coffee-art[data-brand="push-pull"] .art-brand-word,
.coffee-art[data-brand="push-pull"] .art-origin,
.coffee-art[data-brand="push-pull"] .art-roast {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.coffee-art[data-brand="push-pull"] .art-brand-kicker,
.coffee-art[data-brand="push-pull"] .art-brand-subline {
  font-size: 0.44rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.coffee-art[data-brand="push-pull"] .art-brand-subline {
  margin-top: 0;
}

.coffee-art[data-brand="push-pull"] .art-brand-word {
  position: relative;
  margin: 0;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 0.82;
  text-indent: -0.12em;
  white-space: pre-line;
}

.coffee-art[data-brand="push-pull"] .art-brand-word::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  background: var(--art-fg);
  color: #e4f6ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  transform: translate(-50%, -50%);
  content: "×";
}

.coffee-art[data-brand="push-pull"] .art-origin,
.coffee-art[data-brand="push-pull"] .art-roast {
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.art-origin,
.art-roast {
  position: absolute;
  z-index: 2;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.art-origin {
  top: 1rem;
  left: 1rem;
}

.art-roast {
  right: 1rem;
  bottom: 1rem;
}

.sample-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-size: 0.58rem;
  font-weight: 600;
  opacity: 0.72;
}

.coffee-content {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.coffee-card.is-rare .coffee-content::after {
  position: absolute;
  z-index: 2;
  top: 0.78rem;
  left: -0.45rem;
  display: grid;
  width: 44px;
  height: 19px;
  box-sizing: border-box;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 2px;
  padding: 0;
  background: transparent;
  color: #bd402f;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 0.9;
  opacity: 0.66;
  pointer-events: none;
  transform: rotate(-5deg);
  content: "RARE";
}

.coffee-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.coffee-roaster {
  min-height: 1rem;
  margin: 0 0 0.35rem;
  color: #8b8d87;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.coffee-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #777d77;
  font-size: 0.8rem;
}

.icon-button:hover {
  background: #f0eee8;
}

.coffee-meta {
  min-height: 1.25rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.flavor-list {
  display: flex;
  min-height: 24px;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 1rem;
}

.flavor-list span {
  border-radius: 999px;
  padding: 0.27rem 0.55rem;
  background: #f0eee8;
  color: #5d645e;
  font-size: 0.7rem;
}

.coffee-notes {
  min-height: 2.75rem;
  margin: 0.9rem 0 0;
  color: #777c77;
  font-family: var(--serif);
  font-size: 0.73rem;
  line-height: 1.7;
}

.coffee-card-actions {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  min-height: 32px;
  margin-top: auto;
  align-items: center;
  padding-top: 0.75rem;
}

.gift-marker {
  display: grid;
  grid-column: 1;
  width: 32px;
  height: 32px;
  place-items: center;
  justify-self: start;
  font-size: 1rem;
  line-height: 1;
}

.gift-marker[hidden] {
  display: none;
}

.like-button {
  display: grid;
  grid-column: 2;
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  place-items: center;
  justify-self: center;
  background: transparent;
  color: var(--muted);
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.like-button:hover:not(:disabled) {
  color: var(--orange);
  transform: scale(1.08);
}

.like-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.like-button.is-liked {
  color: var(--orange);
  cursor: pointer;
}

.like-button.is-liked:hover {
  transform: scale(1.08);
}

.like-button.is-loading {
  opacity: 0.58;
}

.like-button:disabled {
  cursor: default;
}

.like-heart {
  font-size: 1.08rem;
  line-height: 1;
}

.source-link {
  display: inline-grid;
  grid-column: 3;
  width: 24px;
  height: 24px;
  place-items: center;
  justify-self: end;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.source-link[hidden] {
  display: none;
}

.empty-state {
  min-height: 390px;
  padding: 5.5rem 1rem;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-bean {
  display: block;
  width: 52px;
  height: 70px;
  margin: 0 auto 1.5rem;
  border: 1px solid #aeb8ae;
  border-radius: 52% 48% 48% 52% / 62% 58% 42% 38%;
  transform: rotate(28deg);
}

.empty-bean::after {
  display: block;
  width: 25px;
  height: 55px;
  margin: 6px 0 0 13px;
  border-left: 1px solid #aeb8ae;
  border-radius: 50%;
  content: "";
}

.empty-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.empty-state p {
  margin: 0.65rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.ritual {
  padding: 8.5rem 2rem 9rem;
  background: var(--green);
  color: white;
  text-align: center;
}

.ritual .eyebrow {
  color: var(--lime);
}

.split-flap-quote {
  width: min(100%, 880px);
  margin: 1.8rem auto 2.2rem;
  padding: 0;
}

.borista-board-embed {
  width: 100%;
  aspect-ratio: 42 / 24;
}

.ritual > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--serif);
  font-size: 0.84rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 112px;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem max(32px, calc((100vw - 1240px) / 2));
  background: #112f26;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
}

.footer-brand {
  color: white;
}

.footer-brand .brand-mark {
  background: var(--paper-soft);
  color: var(--green);
}

.site-footer p {
  margin: 0;
}

.site-footer p {
  text-align: right;
}

.coffee-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: min(860px, calc(100dvh - 32px));
  overflow: auto;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: var(--paper-soft);
  box-shadow: 0 30px 100px rgba(8, 20, 12, 0.28);
}

.coffee-dialog::backdrop {
  background: rgba(9, 24, 17, 0.67);
  backdrop-filter: blur(4px);
}

.coffee-dialog form {
  padding: 1.8rem;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.6rem;
}

.dialog-header .eyebrow {
  margin-bottom: 0.45rem;
}

.dialog-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.dialog-header .icon-button {
  font-size: 1.5rem;
  font-weight: 300;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.42rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span,
.field legend {
  color: #575e58;
  font-size: 0.72rem;
  font-weight: 600;
}

.field b {
  color: var(--orange);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  background: white;
  font-size: 0.84rem;
}

.field input,
.field select {
  height: 44px;
  padding: 0 0.8rem;
}

.field textarea {
  min-height: 105px;
  resize: vertical;
  padding: 0.75rem 0.8rem;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #789282;
  box-shadow: 0 0 0 3px rgba(23, 63, 50, 0.08);
}

.number-control {
  position: relative;
}

.number-control input {
  padding-right: 2.2rem;
}

.number-control i {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  color: #7c817c;
  font-size: 0.72rem;
  font-style: normal;
  transform: translateY(-50%);
}

.rating-field {
  margin: 0;
  border: 0;
  padding: 0;
}

.rating-field legend {
  margin-bottom: 0.45rem;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.rating-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-options label {
  display: grid;
  min-height: 41px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
}

.rating-options input:checked + label {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.rating-options input:focus-visible + label {
  outline: 3px solid rgba(220, 107, 66, 0.28);
  outline-offset: 2px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.7rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.dialog-footer-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  min-width: 285px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 5px;
  padding: 0.9rem 1rem;
  background: #102c23;
  color: white;
  box-shadow: 0 15px 50px rgba(7, 22, 14, 0.25);
  font-size: 0.78rem;
}

.toast[hidden] {
  display: none;
}

.toast button {
  border: 0;
  padding: 0.25rem;
  background: transparent;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 700;
}

html[data-theme="dark"] .site-header {
  border-color: var(--line);
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .tab.is-active,
html[data-theme="dark"] .source-link {
  color: #c6decf;
}

html[data-theme="dark"] .brand-mark {
  background: #dce9df;
  color: #173f32;
}

html[data-theme="dark"] .header-nav > a,
html[data-theme="dark"] .preference-button,
html[data-theme="dark"] .hero-description,
html[data-theme="dark"] .collection-intro,
html[data-theme="dark"] .coffee-meta,
html[data-theme="dark"] .coffee-notes,
html[data-theme="dark"] .empty-state p,
html[data-theme="dark"] .field > span,
html[data-theme="dark"] .field legend {
  color: var(--muted);
}

html[data-theme="dark"] .preference-button,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .button-light,
html[data-theme="dark"] .coffee-dialog,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .rating-options label {
  background: var(--card);
}

html[data-theme="dark"] .button-dark {
  background: #cae0d0;
  color: #13251c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .button-quiet {
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .hero-card {
  box-shadow: 30px 34px 0 #263128;
}

html[data-theme="dark"] .collection {
  background: var(--paper-soft);
}

html[data-theme="dark"] .tab {
  color: #929c94;
}

html[data-theme="dark"] .tab > span[id$="-tab-count"],
html[data-theme="dark"] .flavor-list span,
html[data-theme="dark"] .icon-button:hover {
  background: #303a32;
  color: #b7c2b9;
}

html[data-theme="dark"] .tab.is-active > span[id$="-tab-count"] {
  background: var(--green-soft);
  color: #c6decf;
}

html[data-theme="dark"] .search-field svg {
  stroke: #aeb8b0;
}

html[data-theme="dark"] .coffee-card {
  border-color: #364039;
  background: var(--card);
}

html[data-theme="dark"] .coffee-roaster,
html[data-theme="dark"] .icon-button {
  color: #9ca69e;
}

html[data-theme="dark"] .like-button {
  color: #aeb8b0;
}

html[data-theme="dark"] .like-button.is-liked {
  color: var(--orange);
}

html[data-theme="dark"] .coffee-card.is-rare .coffee-content::after {
  color: #f0715d;
}

html[data-theme="dark"] .empty-bean {
  border-color: #718077;
}

html[data-theme="dark"] .empty-bean::after {
  border-color: #718077;
}

html[data-theme="dark"] .ritual {
  background: #15392e;
}

html[data-theme="dark"] .site-footer {
  background: #0d281f;
}

html[data-theme="dark"] .footer-brand .brand-mark {
  background: #dce9df;
}

html[data-theme="dark"] .coffee-dialog::backdrop {
  background: rgba(3, 10, 6, 0.78);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
  border-color: #465048;
  color: var(--ink);
}

html[data-theme="dark"] .rating-options input:checked + label {
  border-color: #9fc4aa;
  background: var(--green-soft);
  color: #d7e9dc;
}

@media (max-width: 1200px) {
  .coffee-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.72fr);
    gap: 3rem;
  }

  .coffee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .site-header {
    width: calc(100% - 36px);
    min-height: 72px;
  }

  .header-nav > a {
    display: none;
  }

  .header-nav {
    gap: 0.45rem;
  }

  .hero {
    width: calc(100% - 36px);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding: 4.5rem 0 5rem;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 13vw, 4.4rem);
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-card {
    min-height: 430px;
    box-shadow: 14px 16px 0 #dfe3d5;
  }

  .collection {
    padding: 5rem 18px 6rem;
  }

  .collection-heading {
    grid-template-columns: 1fr;
  }

  .collection-intro {
    margin: 0;
  }

  .shelf-controls {
    display: block;
    margin-top: 2.4rem;
    border-bottom: 0;
  }

  .tabs {
    height: 48px;
    border-bottom: 1px solid var(--line);
  }

  .control-actions {
    margin-top: 1rem;
    padding-bottom: 0;
  }

  .search-field {
    flex: 1;
  }

  .search-field input {
    width: 100%;
  }

  .coffee-grid {
    grid-template-columns: 1fr;
  }

  .coffee-card {
    min-height: 0;
  }

  .coffee-art {
    height: 220px;
    flex-basis: 220px;
  }

  .ritual {
    padding: 6.5rem 1.5rem 7rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2.2rem 18px;
  }

  .site-footer p {
    text-align: left;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .rating-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .dialog-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
  }

  .toast {
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
