@charset "utf-8";
/* ═══════════════════════════════════════════════════════════════
   링쿠커피 — 홈카페 레시피 메뉴판
   라이트 = 크래프트지 종이 메뉴판 / 다크 = 밤의 에스프레소 바
   ═══════════════════════════════════════════════════════════════ */

/* 폰트는 base.html 에서 unicode-range 서브셋 CSS 두 개로 불러옵니다.
   (pretendard-local.css / gowun-local.css — 쓰는 글자가 든 조각만 내려받습니다) */

/* ── 토큰 ───────────────────────────────────────────────────── */
:root {
  --bg: #EDE4D3;
  --card: #F6F0E4;
  --raised: #FBF7EE;
  --rule: #C9B591;
  --ink: #37251B;
  --ink-soft: #6B5340;
  --accent: #80411E;
  --stamp: #9E3B2C;
  --latte: #E4BC84;

  --step-pour: #2E6E8E;
  --step-wait: #B07D2B;
  --step-act: #7A5A8C;
  --step-press: #6B4C2A;

  --roast-1: #C89F73;
  --roast-2: #8B5A2B;
  --roast-3: #5C3A21;
  --roast-4: #37251B;

  --noise-opacity: .05;

  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-6: 1.5rem; --sp-8: 2rem; --sp-12: 3rem; --sp-16: 4rem;

  --radius: .375rem;
  --bar-h: 4rem;
  --wrap: 42.5rem; /* 680px — 메뉴판은 좁고 길어야 합니다 */

  --font-serif: 'Gowun Batang', 'Nanum Myeongjo', serif;
  --font-sans: 'Pretendard Variable', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A120C; --card: #241A12; --raised: #2E2218;
    --rule: #4A3826; --ink: #EDE0CE; --ink-soft: #B49F87;
    --accent: #C89F73; --stamp: #C96F5E; --latte: #8B5A2B;
    --step-pour: #6FA8C4; --step-wait: #D8A44E; --step-act: #A98BC0; --step-press: #C89F73;
    --roast-1: #E4BC84; --roast-2: #C89F73; --roast-3: #8B5A2B; --roast-4: #5C3A21;
    --noise-opacity: .035;
  }
}

/* 토글은 미디어쿼리를 이겨야 하므로 전체를 재선언합니다. */
:root[data-theme="light"] {
  --bg: #EDE4D3; --card: #F6F0E4; --raised: #FBF7EE;
  --rule: #C9B591; --ink: #37251B; --ink-soft: #6B5340;
  --accent: #80411E; --stamp: #9E3B2C; --latte: #E4BC84;
  --step-pour: #2E6E8E; --step-wait: #B07D2B; --step-act: #7A5A8C; --step-press: #6B4C2A;
  --roast-1: #C89F73; --roast-2: #8B5A2B; --roast-3: #5C3A21; --roast-4: #37251B;
  --noise-opacity: .05;
}
:root[data-theme="dark"] {
  --bg: #1A120C; --card: #241A12; --raised: #2E2218;
  --rule: #4A3826; --ink: #EDE0CE; --ink-soft: #B49F87;
  --accent: #C89F73; --stamp: #C96F5E; --latte: #8B5A2B;
  --step-pour: #6FA8C4; --step-wait: #D8A44E; --step-act: #A98BC0; --step-press: #C89F73;
  --roast-1: #E4BC84; --roast-2: #C89F73; --roast-3: #8B5A2B; --roast-4: #5C3A21;
  --noise-opacity: .035;
}

/* ── 리셋 ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.125rem;      /* 18px — 부엌 판독 하한 */
  line-height: 1.7;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 크래프트지 그레인 — 네트워크 요청 0회 */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }

/* author 의 display 선언은 UA 의 [hidden]{display:none} 을 이깁니다.
   .brew-done/.brew-next/.last-brew/.btn-ghost/.brew-foot 가 hidden 인데도
   떠 있던 원인 — 전역 가드 한 줄로 hidden 의 약속을 복원합니다. */
[hidden] { display: none !important; }

.num { font-family: var(--font-sans); font-variant-numeric: tabular-nums; }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--bg); padding: var(--sp-3) var(--sp-4);
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 레이아웃 ───────────────────────────────────────────────── */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem var(--sp-16);
}

/* ── 헤더 ───────────────────────────────────────────────────── */
.site-head {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--sp-4) 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.head-right { display: flex; align-items: center; gap: var(--sp-2); }

.head-nav a {
  display: inline-flex; align-items: center;
  min-height: 2.75rem;                 /* 44px 터치 타겟 */
  font-size: .9375rem;
  color: var(--ink-soft);
  padding: 0 var(--sp-3);
  border-bottom: 1px solid transparent;
}
.head-nav a:hover, .head-nav a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--rule);
}

.theme-toggle {
  width: 2.75rem; height: 2.75rem;   /* 44px 터치 타겟 */
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
}
.theme-icon {
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -.3rem -.3rem 0 0 var(--card);
  transition: box-shadow .16s ease-out, background .16s ease-out;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon { box-shadow: inset -.3rem -.3rem 0 0 var(--bg); }
}

/* ── 메뉴판 머리말 ─────────────────────────────────────────── */
.menu-head { padding: var(--sp-4) 0 var(--sp-8); }

.page-title {
  font-family: var(--font-serif);
  font-size: 2.25rem; font-weight: 700; line-height: 1.3;
}

.menu-kicker {
  font-size: .8125rem; letter-spacing: .18em;
  color: var(--ink-soft); text-transform: uppercase;
}

.menu-lede {
  font-family: var(--font-serif);
  font-size: 1.25rem; color: var(--ink-soft);
  margin-top: var(--sp-2);
}

/* ── 오늘의 메뉴 ───────────────────────────────────────────── */
.last-brew {
  display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap;
  border: 1.5px solid var(--stamp);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-6);
  background: var(--card);
}
.last-brew-label {
  font-size: .8125rem; letter-spacing: .06em;
  color: var(--stamp); border: 1px solid var(--stamp);
  border-radius: .25rem; padding: .0625rem .375rem;
}
.last-brew-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; }
.last-brew-go { margin-left: auto; font-size: .875rem; color: var(--ink-soft); }

/* ── 필터 칩 ───────────────────────────────────────────────── */
.chips {
  display: flex; gap: var(--sp-2);
  overflow-x: auto; scrollbar-width: none;
  padding: var(--sp-2) 1.25rem;
  margin: 0 -1.25rem var(--sp-6);
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.chips::-webkit-scrollbar { display: none; }
.chips.is-stuck { border-bottom-color: var(--rule); }

.chip {
  flex: none;
  min-height: 2.75rem;
  padding: 0 var(--sp-4);
  border: 1px solid var(--rule);
  border-radius: 2rem;
  color: var(--ink-soft);
  font-size: .9375rem;
  white-space: nowrap;
  transition: background .16s ease-out, color .16s ease-out, border-color .16s ease-out;
}
.chip.is-on {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

.chip-empty {
  text-align: center; color: var(--ink-soft);
  padding: var(--sp-12) 0;
  font-family: var(--font-serif);
}

/* ── 섹션 ───────────────────────────────────────────────────── */
.section { margin-bottom: var(--sp-12); }
.section[hidden] { display: none; }

.section-head {
  display: flex; align-items: baseline; gap: var(--sp-3);
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.section-title { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; }
.section-en {
  font-size: .75rem; letter-spacing: .16em; color: var(--ink-soft);
  margin-left: auto;
}
.section-hint {
  font-size: .9375rem; color: var(--ink-soft);
  margin-bottom: var(--sp-6);
}

/* ── 카드 ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 3px;
  border-radius: var(--radius);
  padding: var(--sp-4) 1.25rem;
}

.card-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

.recipe-card {
  display: flex; flex-direction: column;
  transition: border-color .16s ease-out, background .16s ease-out;
}
.recipe-card[hidden] { display: none; }
.recipe-card:hover { border-color: var(--accent); background: var(--raised); }

.card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.stamp {
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  border-radius: .25rem;
  padding: .0625rem .375rem;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  transform: rotate(-2deg);
  display: inline-block;
  flex: none;
}
.stamp--soft { color: var(--ink-soft); border-color: var(--rule); }

.card-time { font-size: .875rem; color: var(--ink-soft); }
.card-time--list { font-variant-numeric: normal; }

.card-name {
  font-family: var(--font-serif);
  font-size: 1.375rem; font-weight: 700; line-height: 1.4;
}
.card-sub { font-size: .875rem; color: var(--ink-soft); }
.card-quote {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  color: var(--accent);
  margin: var(--sp-3) 0;
}

/* ── 스펙 스트립 (가격표 자리) ─────────────────────────────── */
.spec-strip, .spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  border-top: 1px solid var(--rule);
  padding-top: var(--sp-3);
  margin-top: auto;
}
.spec-grid {
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-2);
  margin: var(--sp-6) 0 var(--sp-3);
  background: var(--card);
}
@media (max-width: 26rem) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); row-gap: var(--sp-4); }
}

.spec-cell { text-align: center; min-width: 0; }

.spec-val {
  font-size: 1.25rem; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.spec-unit { font-size: .8125rem; font-weight: 400; margin-left: .0625rem; }
.spec-range {
  font-size: .6875rem; font-weight: 400; color: var(--ink-soft);
  margin-left: .125rem; vertical-align: super;
}
.spec-dash { color: var(--ink-soft); }
/* 홈 카드는 '고르는' 화면 — 허용 범위는 상세(내리는 화면)에서만 보여줍니다. */
.recipe-card .spec-range { display: none; }
.spec-label {
  font-size: .75rem; letter-spacing: .04em;
  color: var(--ink-soft); margin-top: .125rem;
}

.spec-notes { font-size: .875rem; color: var(--ink-soft); }
.spec-notes li { padding-left: .75rem; text-indent: -.75rem; }
.spec-notes b { color: var(--ink); font-weight: 600; margin-right: .25rem; }

/* ── 미니 타임라인 (레시피의 지문) ─────────────────────────── */
.mini-timeline {
  position: relative; height: .75rem;
  margin-top: var(--sp-3);
}
.mini-rail {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--rule);
}
.mini-dot {
  position: absolute; top: 50%;
  width: .5rem; height: .5rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--step-act);
}
.mini-dot--pour { background: var(--step-pour); }
/* 기다림은 빈 원 — 색이 아니라 모양으로 구분합니다 (범례 없이 읽히도록). */
.mini-dot--wait { background: transparent; border: 1.5px solid var(--step-wait); }
.mini-dot--press { background: var(--step-press); width: .5625rem; height: .5625rem; }

/* ── 원두 선반 링크 ───────────────────────────────────────── */
.shelf-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: var(--sp-4) 1.25rem;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  transition: color .16s ease-out, border-color .16s ease-out;
}
.shelf-link:hover { color: var(--accent); border-color: var(--accent); }
.shelf-link--top { margin: 0 0 var(--sp-8); }

/* ── 레시피 상세 ───────────────────────────────────────────── */
.wrap--recipe { padding-bottom: var(--sp-8); }

.crumb {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-2) 0 var(--sp-6);
}
.crumb-back {
  font-size: .9375rem; color: var(--ink-soft);
  display: inline-flex; align-items: center;
  min-height: 2.75rem;                 /* 44px 터치 타겟 */
  padding: 0 .5rem; margin-left: -.5rem;
}
.crumb-back:hover { color: var(--accent); }

.r-name { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; line-height: 1.3; }
.r-sub { color: var(--ink-soft); font-size: .9375rem; }

.r-beans { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0; }
.bean-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  border: 1px solid var(--rule); border-radius: 2rem;
  padding: var(--sp-1) var(--sp-3);
  font-size: .875rem;
  min-height: 2.25rem;
}
.bean-badge:hover { border-color: var(--accent); color: var(--accent); }
.bean-badge-sub { color: var(--ink-soft); font-size: .8125rem; }

.r-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem; color: var(--accent);
  margin: var(--sp-4) 0 var(--sp-3);
}
.r-blurb { color: var(--ink-soft); }

.warn {
  border-left: 3px solid var(--stamp);
  background: var(--card);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0;
  font-size: .9375rem;
}
.warn strong { color: var(--stamp); margin-right: var(--sp-2); }

/* ── 변형 토글 ─────────────────────────────────────────────── */
.variants { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-4); }
.variant {
  min-height: 2.75rem; padding: 0 var(--sp-4);
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-size: .9375rem; color: var(--ink-soft);
  transition: background .16s ease-out, color .16s ease-out, border-color .16s ease-out;
}
.variant.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.variant-desc { font-size: .875rem; color: var(--ink-soft); margin-top: var(--sp-2); }

/* ── 블록 ───────────────────────────────────────────────────── */
.block { margin-top: var(--sp-8); }
.block-title {
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 700;
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.prep-list { counter-reset: prep; }
.prep-list li {
  counter-increment: prep;
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: var(--sp-2);
  font-size: 1rem;
}
.prep-list li::before {
  content: counter(prep);
  position: absolute; left: 0; top: .25rem;
  width: 1.25rem; height: 1.25rem;
  border: 1px solid var(--rule); border-radius: 50%;
  display: grid; place-items: center;
  font-size: .6875rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.post-list li, .tips li {
  position: relative; padding-left: 1rem; margin-bottom: var(--sp-2);
  font-size: 1rem;
}
.post-list li::before, .tips li::before {
  content: '·'; position: absolute; left: .25rem; color: var(--accent);
}

/* ── 스텝 리스트 ───────────────────────────────────────────── */
.steps { border-top: 1px solid var(--rule); }

.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: var(--sp-3);
  align-items: start;
  min-height: 3rem;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) 0;
  border-bottom: 1px solid var(--rule);
  border-left: 4px solid var(--step-act);
  padding-left: var(--sp-3);
}
.step--pour { border-left-color: var(--step-pour); }
.step--wait { border-left-color: var(--step-wait); }
.step--press { border-left-color: var(--step-press); }
.step--action { border-left-color: var(--step-act); }

.step-when { font-size: .9375rem; color: var(--ink-soft); padding-top: .125rem; }
.step-bullet {
  display: grid; place-items: center;
  width: 1.5rem; height: 1.5rem;
  border: 1px solid var(--rule); border-radius: 50%;
  font-size: .75rem;
}

.step-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.step-label { font-weight: 600; }
.step-water { color: var(--step-pour); font-weight: 700; font-size: .9375rem; }
.step-note { font-size: .875rem; color: var(--ink-soft); line-height: 1.5; }
.step-cum {
  font-size: .9375rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  padding-top: .125rem; white-space: nowrap;
}

.sw {
  font-size: .6875rem; letter-spacing: .04em;
  border: 1px solid currentColor; border-radius: .25rem;
  padding: 0 .25rem;
  flex: none;
}
.sw--open { color: var(--step-pour); }
.sw--closed { color: var(--step-wait); }

/* ── 트러블슈팅 ───────────────────────────────────────────── */
.trouble {
  margin-top: var(--sp-8);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
}
.trouble summary {
  padding: var(--sp-4);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: 3rem;
}
.trouble summary::-webkit-details-marker { display: none; }
.trouble-mark { color: var(--stamp); }
.trouble-body { padding: 0 var(--sp-4) var(--sp-4); font-size: .9375rem; }
.trouble-body ol {
  counter-reset: fix; margin: var(--sp-3) 0;
}
.trouble-body ol li {
  counter-increment: fix; position: relative; padding-left: 1.5rem;
  margin-bottom: var(--sp-2);
}
.trouble-body ol li::before {
  content: counter(fix) '.'; position: absolute; left: 0; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.trouble-note { color: var(--ink-soft); margin-top: var(--sp-3); }

.btn-ghost {
  min-height: 2.75rem; padding: 0 var(--sp-4);
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-size: .9375rem;
  display: inline-flex; align-items: center;
  transition: border-color .16s ease-out, color .16s ease-out;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── 추출 시작 바 ─────────────────────────────────────────── */
.bar-spacer { height: calc(var(--bar-h) + var(--sp-8)); }

.brew-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: var(--sp-2) 1.25rem calc(var(--sp-2) + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.btn-brew {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  height: var(--bar-h);
  background: var(--ink); color: var(--bg);
  border-radius: var(--radius);
  font-family: var(--font-serif);
}
.btn-brew-main { font-size: 1.25rem; font-weight: 700; }
.btn-brew-sub {
  font-family: var(--font-sans);
  font-size: .6875rem; opacity: .7; letter-spacing: .04em;
}

/* ── 추출 모드 오버레이 ───────────────────────────────────── */
.brew {
  position: fixed; inset: 0; z-index: 50;
  /* 주방 글레어 대응 — 테마와 무관하게 항상 다크 */
  --bg: #1A120C; --card: #241A12; --ink: #EDE0CE; --ink-soft: #B49F87;
  --rule: #4A3826; --accent: #C89F73; --stamp: #C96F5E;
  --step-pour: #6FA8C4; --step-wait: #D8A44E; --step-act: #A98BC0; --step-press: #C89F73;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
.brew[hidden] { display: none; }
.brew.is-flash { background: var(--card); }

.brew-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) 1.25rem;
  flex: none;
}
.brew-title {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: .8125rem; color: var(--ink-soft);
}
.brew-close {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  font-size: 1.25rem; color: var(--ink-soft);
}

.brew-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--sp-4);
  padding: 0 1.25rem;
  text-align: center;
}

/* 위계: 행동 지시(무엇을 +몇 g) > 경과 시계.
   전환 타이밍은 차임·진동·플래시가 자동으로 알리므로 눈의 1순위는 행동입니다.
   시계는 페이스 확인·drain 경고용 2순위 — 부엌 팔길이에서 읽히는 크기는 유지. */
.brew-elapsed {
  font-size: clamp(2.25rem, 10vw, 3.25rem);
  font-weight: 700; line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink-soft);
}

.brew-rail {
  position: relative; width: 100%; max-width: 24rem; height: 1rem;
  flex: none;
}
.brew-rail-line {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; background: var(--rule); transform: translateY(-50%);
}
.brew-rail-fill {
  position: absolute; left: 0; top: 50%;
  height: 2px; width: 0; background: var(--accent);
  transform: translateY(-50%);
}
.brew-rail-dots { position: absolute; inset: 0; }
.brew-rail-dots i {
  position: absolute; top: 50%;
  width: .5rem; height: .5rem; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--rule);
}
.brew-rail-dots i.is-done { background: var(--accent); }
.brew-rail-dots i.is-now {
  width: .875rem; height: .875rem;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--bg);
}

.brew-now-head {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-2); flex-wrap: wrap;
}
.brew-now-label {
  font-size: clamp(3rem, 15vw, 4.5rem);
  font-weight: 700; line-height: 1.1;
}
.brew-cum {
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.brew-cum:empty { display: none; }
.brew-note {
  font-family: var(--font-serif);
  font-size: 1.125rem; color: var(--ink-soft);
  max-width: 22rem;
}

.brew-next {
  display: flex; align-items: center; gap: var(--sp-3);
  border-top: 1px dashed var(--rule);
  padding-top: var(--sp-4);
  opacity: .4;
  transition: opacity .3s ease-out;
  font-size: 1rem;
}
.brew-next.is-soon { opacity: 1; }
.brew-next-t { color: var(--ink-soft); }

.brew-done { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.brew-done-mark { font-size: 3rem; color: var(--accent); line-height: 1; }
.brew-done-text { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; }
.brew-done-post { max-width: 24rem; }
.brew-done-post li {
  position: relative; padding-left: 1rem; margin-bottom: var(--sp-2);
  font-size: 1rem; color: var(--ink-soft); text-align: left;
}
.brew-done-post li::before { content: '·'; position: absolute; left: .25rem; color: var(--accent); }
.brew-done-btns { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }

.brew-foot {
  flex: none;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) 1.25rem;
  border-top: 1px solid var(--rule);
}
.btn-pause {
  flex: 1; height: 4.5rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  font-size: 1.125rem; font-weight: 600;
}
.btn-reset {
  min-width: 2.75rem; min-height: 2.75rem;
  padding: 0 var(--sp-3);
  color: var(--ink-soft); font-size: .8125rem;
  border: 1px solid transparent; border-radius: var(--radius);
}
.btn-reset.is-holding { border-color: var(--stamp); color: var(--stamp); }
.reset-hint { font-size: .6875rem; }

/* 패드 가로 거치 — 스크롤 0 */
@media (orientation: landscape) and (max-height: 32.5rem) {
  .brew-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--sp-3);
  }
  .brew-elapsed { grid-column: 1; font-size: clamp(2rem, 8vh, 3rem); }
  .brew-rail { grid-column: 1; }
  .brew-now { grid-column: 2; grid-row: 1 / span 2; }
  .brew-now-label { font-size: clamp(2.25rem, 9vh, 3.25rem); }
  .brew-cum { font-size: clamp(1.5rem, 5vh, 2rem); }
  .brew-note { display: none; }
  .brew-next { grid-column: 1 / -1; padding-top: var(--sp-2); }
  .btn-pause { height: 3.5rem; }
}

/* ── 원두 선반 ─────────────────────────────────────────────── */
.bean-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .bean-grid { grid-template-columns: 1fr 1fr; } }

.bean-card {
  position: relative;   /* solo 행의 stretched link 기준 */
  scroll-margin-top: var(--sp-8);
  display: flex; flex-direction: column;
}
.bean-card:target { border-color: var(--accent); outline-color: var(--accent); }

.roast-dots { display: inline-flex; gap: .1875rem; align-items: center; }
.roast-dots i {
  width: .5rem; height: .5rem; border-radius: 50%;
  border: 1px solid var(--roast-3);
}
.roast-dots i.on { background: var(--roast-3); }
.roast-1 i.on { background: var(--roast-1); border-color: var(--roast-1); }
.roast-2 i.on { background: var(--roast-2); border-color: var(--roast-2); }
.roast-3 i.on { background: var(--roast-3); border-color: var(--roast-3); }
.roast-4 i.on { background: var(--roast-4); border-color: var(--roast-4); }

.bean-name { font-family: var(--font-serif); font-size: 1.375rem; font-weight: 700; line-height: 1.4; }
.bean-sub { font-size: .875rem; color: var(--ink-soft); }
.bean-quote {
  font-family: var(--font-serif); font-size: 1.0625rem;
  color: var(--accent); margin: var(--sp-3) 0;
}
.bean-desc { font-size: .9375rem; color: var(--ink-soft); }

.bean-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  border-top: 1px solid var(--rule);
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  font-size: .8125rem;
}
.bean-meta dt { color: var(--ink-soft); font-size: .75rem; }
.bean-meta dd { font-weight: 600; }

/* 이 원두로 내리는 메뉴 — 각주가 아니라 '누르는 메뉴' 로 읽혀야 합니다. */
.bean-menu {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  padding-top: var(--sp-3);
}
.bean-menu-head {
  font-size: .75rem; color: var(--ink-soft);
  margin-bottom: var(--sp-2);
}
.bean-menu-row {
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: 2.75rem;                 /* 44px 터치 타겟 */
  padding: var(--sp-1) var(--sp-3);
  margin-top: var(--sp-1);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: .875rem;
  transition: border-color .16s ease-out, color .16s ease-out;
}
.bean-menu-row:hover { border-color: var(--accent); color: var(--accent); }
.bean-menu-no { color: var(--ink-soft); font-size: .8125rem; flex: none; }
.bean-menu-name { font-weight: 600; min-width: 0; }
.bean-menu-rec {
  font-size: .6875rem; color: var(--stamp);
  border: 1px solid var(--stamp); border-radius: .25rem;
  padding: 0 .25rem; flex: none;
}
.bean-menu-time {
  margin-left: auto; flex: none;
  font-size: .8125rem; color: var(--ink-soft);
}
.bean-menu-go { margin-left: auto; flex: none; }
.bean-menu-time + .bean-menu-go { margin-left: 0; }
.bean-menu-only { font-size: .75rem; color: var(--ink-soft); margin-top: var(--sp-2); }

/* 레시피가 하나뿐인 원두는 카드 전체가 탭 타겟입니다. */
.bean-menu-row--solo::after { content: ''; position: absolute; inset: 0; }

.bean-card--out { opacity: .55; }
.card-top-stamps { display: flex; gap: var(--sp-2); align-items: center; }

/* ── 골든 룰 ───────────────────────────────────────────────── */
.rules { margin-top: var(--sp-16); }
.rule {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: var(--sp-3);
}
.rule summary {
  padding: var(--sp-4);
  cursor: pointer; list-style: none;
  font-family: var(--font-serif);
  font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3rem;
}
.rule summary::-webkit-details-marker { display: none; }
.rule summary::after { content: '+'; color: var(--ink-soft); font-family: var(--font-sans); }
.rule[open] summary::after { content: '−'; }
.rule-body { padding: 0 var(--sp-4) var(--sp-4); }
.rule-lead { font-family: var(--font-serif); font-size: 1.125rem; margin-bottom: var(--sp-3); }
.rule-body p { font-size: .9375rem; color: var(--ink-soft); margin-bottom: var(--sp-3); }
.rule-body ul li {
  position: relative; padding-left: 1rem; margin-bottom: var(--sp-2);
  font-size: .9375rem;
}
.rule-body ul li::before { content: '·'; position: absolute; left: .25rem; color: var(--accent); }

/* ── 푸터 ───────────────────────────────────────────────────── */
.site-foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--sp-8) 1.25rem calc(var(--sp-8) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  font-size: .8125rem; color: var(--ink-soft);
  text-align: center;
}
.foot-gear { margin-top: var(--sp-2); letter-spacing: .04em; }

/* ── 모션 최소화 ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
