/* Cookbook — one dish at a time */
.cb-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 1.5rem) 3.5rem;
  position: relative;
  z-index: 1;
}

.cb-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.cb-pos {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cb-nav {
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cb-nav:hover:not(:disabled) {
  border-color: var(--soft);
  color: var(--soft);
  transform: translateY(-1px);
}
.cb-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cb-dish {
  animation: cb-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cb-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.cb-hero {
  margin: 0 -0.25rem 1.25rem;
  min-height: min(42vh, 360px);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 60% at 40% 30%, rgba(184, 224, 90, 0.12), transparent 60%),
    rgba(0, 0, 0, 0.28);
}
.cb-hero img {
  display: block;
  width: 100%;
  height: min(42vh, 360px);
  object-fit: cover;
  animation: cb-img 0.7s ease both;
}
@keyframes cb-img {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}
.cb-hero-empty {
  min-height: 8rem;
  background:
    radial-gradient(circle at 70% 40%, rgba(142, 200, 216, 0.2), transparent 55%),
    linear-gradient(135deg, rgba(232, 93, 76, 0.15), transparent 50%);
}

.cb-body .eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cup);
  margin-bottom: 0.35rem;
}
.cb-body h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.45rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--paper);
  margin-bottom: 0.4rem;
}
.cb-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
}

.cb-ings {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
.cb-ings li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(247, 244, 236, 0.08);
  font-size: 0.95rem;
}
.cb-ing-name { color: var(--muted); }
.cb-ings .measure {
  position: relative;
  display: inline-block;
  cursor: help;
  border-bottom: 1px dotted var(--soft);
  color: var(--paper);
  font-weight: 700;
  white-space: nowrap;
}
.cb-ings .measure .tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 120px;
  max-width: 220px;
  background: #1a2218;
  color: #f3efe6;
  border: 1px solid var(--soft);
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}
.cb-ings .measure:hover .tip,
.cb-ings .measure:focus .tip { visibility: visible; opacity: 1; }

.cb-steps h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.1rem;
  color: var(--soft);
  margin-bottom: 0.4rem;
}
.cb-steps p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 1.25rem;
}

.cb-shop {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.cb-loading,
.cb-empty,
.cb-empty-notes {
  color: var(--muted);
  padding: 1.5rem 0;
}

.cb-comments {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  animation: cb-in 0.55s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.cb-comments h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--soft);
}

.cb-comment-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.cb-note {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(247, 244, 236, 0.08);
}
.cb-note header {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}
.cb-note time { font-size: 0.75rem; color: var(--muted); }
.cb-note p { color: var(--paper); font-size: 0.95rem; line-height: 1.4; }
.cb-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.cb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cb-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.cb-form-lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.cb-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.cb-label input[type="text"],
.cb-label textarea,
.cb-label input[type="file"] {
  font: inherit;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
}
.cb-label input[type="file"] {
  padding: 0.4rem;
  font-size: 0.85rem;
}
.cb-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}
.cb-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.cb-status {
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .cb-ings li { flex-direction: column; gap: 0.2rem; }
  .cb-hero img { height: min(36vh, 280px); }
}
