*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1, h2, h3, p, span, label, button, input, select, textarea, code, strong, a, footer {
  text-shadow: none !important;
  filter: none !important;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #fffaf3 0%, #eef2f6 100%);
  color: #0f172a;
  line-height: 1.5;
}

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

button, input, select {
  font: inherit;
}

.topbar {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid #dbe2ec;
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand-badge {
  display: inline-flex;
  background: #fff4d6;
  color: #92400e;
  border: 1px solid #f6d69a;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #eef6ff;
  border: 1px solid #c7d8ff;
  color: #1d4ed8;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.discord-badge a {
  color: inherit;
  text-decoration: none;
}

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.card {
  background: #ffffff;
  border: 1px solid #dfe7ef;
  border-radius: 22px;
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.28);
}

.hero-card {
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.hero-copy {
  flex: 1 1 560px;
}

.pill {
  display: inline-block;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 900;
  margin-bottom: 0.6rem;
}

.desc {
  color: #475569;
  max-width: 760px;
  font-size: 1rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 0.75rem;
  width: min(100%, 360px);
}

.metric {
  background: linear-gradient(135deg, #f8fafc, #f0fdf4);
  border: 1px solid #dbe7ea;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.metric strong {
  font-size: 1.4rem;
}

.metric span {
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 700;
  color: #334155;
}

.field input, .field select, .input-text {
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  background: #f8fafc;
  color: #0f172a;
}

.btn-primary, .btn-secondary {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-primary {
  background: #0f172a;
  color: #fff;
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-primary:hover, .btn-secondary:hover {
  opacity: 0.95;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 1.2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.2rem;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.recipe-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid #dfeaf3;
  border-radius: 18px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
}

.recipe-card.active {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px #fcd34d;
}

.recipe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.recipe-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.recipe-card .meta {
  color: #475569;
  font-size: 0.8rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.tag {
  display: inline-flex;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 800;
}

.favorite-button {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: #f59e0b;
}

.recipe-detail {
  min-height: 100%;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-header h2 {
  font-size: 1.4rem;
}

.detail-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.meta-pill {
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.portion-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.portion-box input[type="range"] {
  width: 100%;
}

.portion-box strong {
  min-width: 54px;
  text-align: center;
  font-size: 1.1rem;
}

.ingredient-list, .step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.ingredient-list li {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #dfe7ef;
  padding: 0.7rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.ingredient-list .qty {
  font-weight: 800;
  color: #1d4ed8;
}

.step-list li {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  color: #7c2d12;
}

.favorites-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.favorite-item {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
}

.form-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.input-text {
  flex: 1;
  min-width: 220px;
}

.status-message {
  min-height: 1.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #166534;
  margin-bottom: 0.85rem;
}

.records-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.records-list li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
}

.empty-state {
  color: #475569;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

footer {
  text-align: center;
  padding: 1.25rem;
  background: #ffffff;
  border-top: 1px solid #dce4ef;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
}

@media (max-width: 850px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }
}
