.berry-page {
  padding-top: 8.5rem;
  padding-bottom: 3rem;
  min-height: 75vh;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 12rem);
}

.berry-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.berry-hero h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

.berry-hero-lead {
  color: #64748b;
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.5;
}

.berry-search {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.berry-search-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

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

.berry-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.berry-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.berry-suggestion-btn {
  width: 100%;
  border: 0;
  text-align: left;
  background: #fff;
  padding: 0.55rem 0.85rem;
  font-size: 0.94rem;
  color: #1e293b;
}

.berry-suggestion-btn:hover {
  background: #f1f5f9;
}

.berry-submit {
  border: 0;
  border-radius: 12px;
  background: #0ea5e9;
  color: #fff;
  padding: 0.72rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.berry-submit:hover {
  background: #0284c7;
}

.berry-section {
  margin-bottom: 1.75rem;
}

.berry-section-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.berry-section-hint {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.berry-subhead {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  color: #0f172a;
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

.berry-muted {
  font-size: 0.88rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.berry-detail-head {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.berry-token {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  vertical-align: middle;
}

.berry-token-label {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
}

.berry-token--grid {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.berry-token--grid .berry-token-label {
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 100%;
  word-break: break-word;
}

.berry-token--hero {
  gap: 0.85rem;
}

.berry-token--hero .berry-item-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.berry-token--hero .berry-token-label {
  font-size: 1.45rem;
  font-weight: 700;
}

.berry-token--inline .berry-item-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}

.berry-token--inline .berry-token-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.berry-token--grid .berry-item-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.berry-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  padding: 0.65rem 0.5rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.berry-chip:hover {
  border-color: #7dd3fc;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.12);
}

.berry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.65rem;
}

.berry-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.65rem;
}

.berry-card--recipe {
  padding: 1rem 1.15rem;
}

.berry-recipe-formula {
  margin-bottom: 0.5rem;
}

.berry-formula-parts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.25rem;
  row-gap: 0.5rem;
}

.berry-formula-op {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 0.15rem;
  user-select: none;
}

.berry-formula-muted {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 600;
  margin-right: 0.2rem;
}

.berry-formula-or-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
}

.berry-recipe-meta {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.45;
}

.berry-meta-table-wrap {
  margin-top: 0.65rem;
}

.berry-meta-table th {
  width: 42%;
  max-width: 11rem;
  font-weight: 600;
  color: #475569;
  vertical-align: top;
}

.berry-meta-table td {
  color: #1e293b;
}

.berry-outcome-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.berry-outcome-link:hover .berry-token-label {
  color: #0284c7;
}

.berry-token-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.berry-token-link:hover .berry-token-label {
  color: #0284c7;
}

.berry-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.berry-table {
  width: 100%;
  border-collapse: collapse;
}

.berry-table th,
.berry-table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.berry-table th {
  background: #f8fafc;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.berry-table tbody tr:last-child td {
  border-bottom: 0;
}

.pokemon-berry-icon {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 0.4rem;
  object-fit: contain;
}

.spawn-mini {
  display: inline-block;
  font-size: 0.8rem;
  text-decoration: none;
  color: #0284c7;
  font-weight: 500;
}

.spawn-mini:hover {
  text-decoration: underline;
}

.berry-attribution {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
}

.berry-attribution a {
  color: #64748b;
  text-decoration: underline;
}

.berry-attribution a:hover {
  color: #475569;
}

.berry-attribution--footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .berry-page {
    padding-top: 7.25rem;
  }
  .berry-search-row {
    flex-direction: column;
  }
  .berry-submit {
    width: 100%;
  }
  .berry-formula-parts {
    gap: 0.4rem;
  }
}
