:root {
  --bk-orange: #ff8733;
  --bk-cream: #f5ebdc;
  --bk-red: #d62700;

  --bg: var(--bk-cream);
  --panel: rgba(255, 135, 51, 0.16);
  --panel-2: rgba(255, 135, 51, 0.24);
  --border: rgba(214, 39, 0, 0.22);
  --text: var(--bk-red);
  --muted: rgba(214, 39, 0, 0.72);
  --accent: var(--bk-orange);
  --accent-2: var(--bk-red);
  --danger: var(--bk-red);
  --shadow: 0 18px 50px rgba(214, 39, 0, 0.18);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  overflow-x: hidden;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(255, 135, 51, 0.30), transparent 60%),
    radial-gradient(900px 450px at 80% 0%, rgba(214, 39, 0, 0.18), transparent 55%),
    radial-gradient(800px 500px at 50% 90%, rgba(255, 135, 51, 0.16), transparent 55%),
    var(--bg);
}

a {
  color: inherit;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 18px 44px;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.headerLeft {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.logo {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  display: block;
  object-fit: contain;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.2px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.brand p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    align-items: start;
  }

  .cardInputs {
    position: sticky;
    top: 18px;
  }

  .recipeLayout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 14px;
    align-items: start;
  }

  .recipeLayout .hr {
    display: none;
  }
}

.card {
  background: linear-gradient(180deg, var(--panel), rgba(245, 235, 220, 0.72));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: clip;
  min-width: 0;
}

.cardHeader {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(214, 39, 0, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.cardHeader h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.cardBody {
  padding: 14px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.section:last-child {
  margin-bottom: 0;
}

.labelRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.labelRow label {
  font-size: 13px;
  font-weight: 600;
}

.help {
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rowStack {
  display: flex;
  gap: 10px;
}

.rowStack .input {
  flex: 1;
}

@media (max-width: 520px) {
  .container {
    padding: 18px 14px 36px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .labelRow {
    flex-direction: column;
    align-items: flex-start;
  }

  .cardHeader {
    align-items: flex-start;
  }

  .cardHeader .row {
    width: 100%;
  }

  .rowStack {
    flex-direction: column;
  }

  .rowStack .btn {
    width: 100%;
  }
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(214, 39, 0, 0.22);
  background: rgba(255, 135, 51, 0.12);
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}

.input:focus {
  border-color: rgba(255, 135, 51, 0.95);
  box-shadow: 0 0 0 4px rgba(255, 135, 51, 0.22);
}

.btn {
  border-radius: 12px;
  border: 1px solid rgba(214, 39, 0, 0.22);
  background: rgba(255, 135, 51, 0.14);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:hover {
  background: rgba(255, 135, 51, 0.22);
  border-color: rgba(214, 39, 0, 0.30);
}

.btn:active {
  transform: translateY(1px);
}

.btnPrimary {
  background: linear-gradient(135deg, rgba(255, 135, 51, 0.95), rgba(214, 39, 0, 0.90));
  border-color: rgba(214, 39, 0, 0.55);
  color: var(--bk-cream);
}

.btnPrimary:hover {
  background: linear-gradient(135deg, rgba(255, 135, 51, 1), rgba(214, 39, 0, 0.96));
}

.btnDanger {
  border-color: rgba(214, 39, 0, 0.90);
  background: rgba(214, 39, 0, 0.90);
  color: var(--bk-cream);
}

.btnDanger:hover {
  background: rgba(214, 39, 0, 0.96);
}

.btnSuccess {
  border-color: rgba(255, 135, 51, 0.90);
  background: rgba(255, 135, 51, 0.88);
  color: var(--bk-cream);
}

.btnSuccess:hover {
  background: rgba(255, 135, 51, 0.96);
}

.btnSmall {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214, 39, 0, 0.22);
  background: rgba(255, 135, 51, 0.14);
  font-size: 12px;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip button {
  all: unset;
  cursor: pointer;
  color: rgba(214, 39, 0, 0.72);
  font-size: 12px;
  line-height: 1;
}

.chip button:hover {
  color: rgba(214, 39, 0, 0.92);
}

.pills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 520px) {
  .pills {
    grid-template-columns: 1fr 1fr;
  }
}

.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(214, 39, 0, 0.22);
  background: rgba(255, 135, 51, 0.10);
}

.pill input {
  width: 16px;
  height: 16px;
}

.pill span {
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

@media (min-width: 520px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.recipeTitle {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  overflow-wrap: anywhere;
}

.meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.metaBadge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214, 39, 0, 0.20);
  background: rgba(255, 135, 51, 0.12);
}

.hr {
  height: 1px;
  background: rgba(214, 39, 0, 0.18);
  margin: 14px 0;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: rgba(214, 39, 0, 0.90);
  font-size: 14px;
  line-height: 1.55;
}

.list li {
  margin-bottom: 6px;
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 520px) {
  .kv {
    grid-template-columns: 1fr 1fr;
  }
}

.kvItem {
  border: 1px solid rgba(214, 39, 0, 0.20);
  background: rgba(255, 135, 51, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
}

.kvItem .k {
  font-size: 12px;
  color: var(--muted);
}

.kvItem .v {
  margin-top: 4px;
  font-size: 14px;
}

.notice {
  border: 1px dashed rgba(214, 39, 0, 0.28);
  background: rgba(255, 135, 51, 0.10);
  padding: 12px;
  border-radius: 12px;
  color: rgba(214, 39, 0, 0.86);
  font-size: 13px;
  line-height: 1.5;
}

.photoWrap {
  border: 1px solid rgba(214, 39, 0, 0.22);
  background: rgba(255, 135, 51, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.photoPreview {
  width: 100%;
  height: auto;
  display: block;
  max-height: 240px;
  object-fit: cover;
}

.error {
  border-color: rgba(214, 39, 0, 0.70);
  background: rgba(214, 39, 0, 0.10);
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(214, 39, 0, 0.78);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(214, 39, 0, 0.38);
  animation: pulse 900ms infinite ease-in-out;
}

.dot:nth-child(2) {
  animation-delay: 150ms;
}

.dot:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes pulse {
  0% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    opacity: 0.35;
  }
}

.savedList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.savedItem {
  border: 1px solid rgba(214, 39, 0, 0.20);
  background: rgba(255, 135, 51, 0.10);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.savedItemTitle {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.savedItemTitle strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.savedItemTitle span {
  font-size: 12px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .savedItem {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .actions .btn {
    flex: 1;
  }
}
