* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  color-scheme: light;
  --ink: #1f1b18;
  --muted: #675b52;
  --soft: #8a7461;
  --line: rgba(31, 27, 24, 0.17);
  --line-strong: rgba(31, 27, 24, 0.28);
  --paper: #fbfaf7;
  --paper-2: #fffdf9;
  --wash: #e8e1d7;
  --accent: #a15d2b;
  --accent-soft: #fff5e9;
  --success: #405f4f;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--wash);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  letter-spacing: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.site-shell {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 20px 80px rgba(42, 32, 24, 0.12);
}

.mono {
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar {
  min-height: 48px;
  padding: 14px 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.topbar a,
.touch-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.home-hero,
.recipe-hero {
  padding: 8px 20px 26px;
}

.home-cover {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 0 22px;
}

.issue {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 15vw, 74px);
  line-height: 0.94;
  font-weight: 700;
}

.home-title {
  font-size: clamp(58px, 17vw, 82px);
}

.lede {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: 50% 58%;
  border-radius: 2px;
}

.title-block {
  padding: 28px 0 0;
  border-bottom: 1px solid var(--line);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stat {
  min-height: 86px;
  padding: 13px 8px;
  background: var(--paper);
}

.stat b {
  display: block;
  font-size: 18px;
  line-height: 1.18;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.directory-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.95);
  backdrop-filter: blur(14px);
}

.search {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}

.search:focus {
  border-color: var(--accent);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 2px;
}

.filter {
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 13px;
}

.filter.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.directory {
  padding: 8px 20px 30px;
}

.section,
.home-section {
  padding: 28px 20px 0;
}

.home-section {
  padding-top: 24px;
}

.section-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.num {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 30px;
  font-style: italic;
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
}

h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.recipe-list {
  display: grid;
  gap: 16px;
}

.recipe-card {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-decoration: none;
}

.recipe-card:first-child {
  border-top: 0;
}

.recipe-card[aria-disabled="true"] {
  color: var(--soft);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--success);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 8px;
  text-transform: uppercase;
}

.status.draft {
  color: var(--soft);
  background: var(--paper-2);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 0 8px;
}

.card-lede {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.no-results {
  display: none;
  margin: 22px 0 0;
  border: 1px solid var(--line);
  padding: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.card {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.caption {
  margin: 0 0 12px;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ingredients {
  display: grid;
  gap: 4px;
}

.row {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px dotted rgba(31, 27, 24, 0.2);
  padding: 9px 0;
  color: var(--muted);
  font-size: 16px;
}

.row strong {
  color: var(--ink);
  white-space: nowrap;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.step {
  counter-increment: step;
  border-top: 1px solid rgba(31, 27, 24, 0.16);
  padding: 16px 0;
}

.step b {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  font-size: 18px;
  line-height: 1.45;
}

.step b::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding-top: 4px;
}

.step p {
  margin: 8px 0 0 52px;
  color: var(--muted);
  line-height: 1.75;
}

.note-list {
  display: grid;
  gap: 12px;
}

.note {
  border: 1px solid rgba(161, 93, 43, 0.32);
  background: var(--accent-soft);
  color: #4b4038;
  line-height: 1.75;
  padding: 16px;
}

.pairing-list,
.variation-list {
  display: grid;
  gap: 14px;
}

.pairing,
.variation-group {
  border-top: 1px solid rgba(31, 27, 24, 0.16);
  padding: 16px 0;
}

.pairing:first-child,
.variation-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.pairing b,
.variation b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.pairing p,
.variation p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.variation-grid {
  display: grid;
  gap: 12px;
}

.variation {
  border: 1px solid rgba(31, 27, 24, 0.16);
  background: var(--paper-2);
  padding: 16px;
}

.variation .meta {
  display: inline-flex;
  margin-bottom: 9px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer {
  padding: 34px 20px 38px;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.06em;
}

@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }

  .site-shell {
    border-radius: 22px;
    overflow: hidden;
  }
}
