.crafting-recipes-page {
  background: #f8fafc;
}

/* styles.css adds 9rem vertical padding to all <section> on desktop */
.crafting-recipes-page section {
  padding: 0;
}

.cr-page {
  padding: 8.5rem 1rem 4rem;
  min-height: 75vh;
}

.cr-shell {
  max-width: 920px;
  margin: 0 auto;
}

.cr-hero {
  text-align: center;
  margin-bottom: 1.35rem;
}

.cr-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cr-kicker a {
  color: #4aa3df;
  text-decoration: none;
}

.cr-kicker a:hover {
  text-decoration: underline;
}

.cr-hero h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.cr-subtitle {
  color: #4b5563;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}

.cr-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.cr-search {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid #f1f5f9;
}

.cr-search-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.cr-input-wrap {
  position: relative;
  flex: 1;
}

.cr-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.cr-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.72rem 0.85rem 0.72rem 2.45rem;
  background: #fff;
  color: #111827;
}

.cr-input:focus {
  outline: none;
  border-color: #4aa3df;
  box-shadow: 0 0 0 3px rgba(74, 163, 223, 0.2);
}

.cr-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  max-height: 260px;
  overflow-y: auto;
}

.cr-suggestion-btn {
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
}

.cr-suggestion-btn:hover,
.cr-suggestion-btn:focus-visible {
  background: #f1f5f9;
}

.cr-btn-primary {
  border: 0;
  border-radius: 10px;
  background: #4aa3df;
  color: #fff;
  font-weight: 600;
  padding: 0.72rem 1.2rem;
  white-space: nowrap;
}

.cr-btn-primary:hover {
  background: #3b8fc7;
}

.cr-empty-banner {
  padding: 0.85rem 1.15rem;
  background: #fff7ed;
  color: #9a3412;
  border-bottom: 1px solid #fed7aa;
  font-size: 0.95rem;
}

.cr-detail,
.cr-index {
  padding: 1.25rem 1.15rem 1.4rem;
}

.cr-detail-header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.cr-detail-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.cr-detail-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  color: #111827;
}

.cr-detail-desc {
  margin: 0;
  color: #374151;
  line-height: 1.5;
}

.cr-seo-intro {
  margin: 0 0 1.1rem;
}

.cr-seo-heading {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.cr-seo-intro p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
  font-size: 0.95rem;
}

.cr-related-sources {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.cr-related-source-list {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
  color: #334155;
  line-height: 1.5;
}

.cr-related-source-list li + li {
  margin-top: 0.4rem;
}

.cr-related-source-list a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.cr-related-source-list a:hover,
.cr-related-source-list a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.cr-detail-desc--muted,
.cr-muted {
  color: #6b7280;
}

.cr-recipe {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fafbfc;
}

.cr-recipe-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.cr-recipe-head h3 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.cr-result-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4aa3df;
  background: rgba(74, 163, 223, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.cr-craft-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.cr-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 0.35rem;
  background: #2a2420;
  border: 3px solid #5c4a3a;
  border-radius: 12px;
  padding: 0.45rem;
}

.cr-cell,
.cr-result-slot {
  width: 72px;
  min-height: 72px;
  background: #3a322c;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.3rem;
  color: #f8f1e7;
  text-align: center;
}

.cr-cell--link,
.cr-pot-slot--link {
  text-decoration: none;
  color: #f8f1e7;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cr-cell--link:hover,
.cr-cell--link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(74, 163, 223, 0.55);
  outline: none;
  text-decoration: none;
  color: #f8f1e7;
}

.cr-pot-slot--link:hover,
.cr-pot-slot--link:focus-visible {
  border-color: rgba(74, 163, 223, 0.7);
  box-shadow: 0 0 0 1px rgba(74, 163, 223, 0.35);
  text-decoration: none;
  color: #f8f1e7;
  outline: none;
}

.cr-cell-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.cr-cell-name {
  font-size: 0.62rem;
  line-height: 1.2;
  font-weight: 600;
  color: #f8f1e7;
}

.cr-arrow {
  font-size: 1.4rem;
  color: #6b7280;
  font-weight: 700;
}

.cr-result-slot {
  width: 88px;
  min-height: 88px;
  border: 2px solid rgba(74, 163, 223, 0.45);
}

.cr-pot {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 180, 90, 0.12), transparent 55%),
    linear-gradient(180deg, #3d342e 0%, #2a2420 55%, #1a1512 100%);
  border: 3px solid #5c4a3a;
  border-radius: 16px;
  padding: 1rem;
  color: #f8f1e7;
  overflow: hidden;
}

.cr-pot-glow {
  position: absolute;
  inset: auto 20% -20% 20%;
  height: 40%;
  background: radial-gradient(circle, rgba(255, 140, 60, 0.22), transparent 70%);
  pointer-events: none;
}

.cr-pot-label {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 241, 231, 0.72);
}

.cr-pot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.cr-pot-slot {
  background: #3a322c;
  border: 1px solid rgba(255, 230, 200, 0.12);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  min-height: 5rem;
}

.cr-pot-result {
  margin-top: 0.85rem;
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
}

.cr-pot-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: rgba(248, 241, 231, 0.7);
}

.cr-craft-wrap--pot {
  margin: 0 0 0.85rem;
}

.cr-craft-wrap--pot .cr-cell,
.cr-craft-wrap--pot .cr-result-slot {
  background: rgba(26, 21, 18, 0.72);
}

.cr-sub-notes {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.85rem;
  list-style: none;
  border-radius: 10px;
  background: #eef6fc;
  border: 1px solid #d5e8f6;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.45;
}

.cr-sub-notes li + li {
  margin-top: 0.35rem;
}

.cr-obtain {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3f8fc 0%, #eaf3fa 100%);
  border: 1px solid #d5e8f6;
}

.cr-obtain-title {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.cr-obtain-summary {
  margin: 0 0 0.55rem;
  color: #334155;
  line-height: 1.5;
}

.cr-obtain-list {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: #475569;
  line-height: 1.45;
}

.cr-obtain-list li + li {
  margin-top: 0.3rem;
}

.cr-farm-list {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5e7eb;
}

.cr-farm-list-label {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
}

.cr-farm-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.cr-farm-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.cr-farm-item-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
}

.cr-farm-item-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}

a.cr-farm-item-name:hover {
  color: #2563eb;
  text-decoration: underline;
}

.cr-farm-add-btn {
  border: 1px solid rgba(74, 163, 223, 0.45);
  background: rgba(74, 163, 223, 0.12);
  color: #1d4f7a;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cr-farm-add-btn:hover:not(:disabled),
.cr-farm-add-btn:focus-visible {
  background: rgba(74, 163, 223, 0.22);
  border-color: rgba(74, 163, 223, 0.75);
  color: #0f3a5c;
  outline: none;
}

.cr-farm-add-btn:disabled {
  opacity: 0.75;
  cursor: default;
}

.cr-farm-add-btn.is-added {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.45);
  color: #166534;
}

.cr-farm-add-btn--inline {
  margin-top: 0.15rem;
}

.cr-farm-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1080;
  max-width: min(92vw, 420px);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
}

.cr-farm-toast.is-error {
  background: #7f1d1d;
}

@media (max-width: 640px) {
  .cr-farm-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .cr-farm-add-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.cr-simple-list {
  margin: 0;
  padding-left: 1.15rem;
  color: #374151;
}

.cr-simple-list li {
  margin-bottom: 0.35rem;
}

.cr-back {
  margin: 0.5rem 0 0;
}

.cr-back a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.cr-back a:hover {
  text-decoration: underline;
}

.cr-index-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: #111827;
}

.cr-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.55rem;
}

.cr-item-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cr-item-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 4px 12px rgba(74, 163, 223, 0.12);
  text-decoration: none;
  color: #111827;
}

.cr-item-card.is-hidden {
  display: none;
}

.cr-item-card-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.cr-item-card-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.cr-related {
  margin-top: 1.5rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.92rem;
}

.cr-related a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.cr-related a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cr-page {
    padding-top: 7.5rem;
  }

  .cr-search-row {
    flex-direction: column;
  }

  .cr-btn-primary {
    width: 100%;
  }

  .cr-grid {
    grid-template-columns: repeat(3, 64px);
  }

  .cr-cell {
    width: 64px;
    min-height: 64px;
  }

  .cr-craft-wrap {
    justify-content: center;
  }
}
