:root {
  color-scheme: light;
  --bg: #FAF4EC;
  --card: #FFFFFF;
  --border: #EDE2D4;
  --ink: #3D3229;
  --text-2: #6B5F51;
  --muted: #8C7F70;
  --error: #C0392B;
  --accent: #D64545;
  --accent-hover: #B33636;
  --accent-tint: #FBE3E1;
  --accent-line: #F0C4BE;
  --shadow-card: 0 2px 10px rgba(60,40,20,0.06);
  --focus-ring: 0 0 0 3px rgba(214,69,69,0.16);
  --radius-card: 20px;
  --radius-pill: 999px;
  --radius-icon: 14px;
  --font: "Nunito", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  padding: 40px 20px;
}

header,
main {
  max-width: 680px;
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-icon);
  flex-shrink: 0;
}

.app-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.section-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
}

.map-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.suggest-section,
.add-section {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}

.add-section .field-label {
  margin-top: 14px;
}

.add-section .field-label:first-of-type {
  margin-top: 0;
}

.map-input,
textarea,
select {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
}

.map-input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.error-msg {
  color: var(--error);
  font-size: 13px;
  margin: 8px 0 0;
}

.helper-text {
  color: var(--muted);
  font-size: 14px;
  margin: 14px 0 0;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.primary-btn {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-pill);
  padding: 14px 18px;
  cursor: pointer;
  width: 100%;
  border: none;
  background: var(--accent);
  color: #fff;
}

.primary-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.primary-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.suggestion-result {
  margin-top: 16px;
  padding: 18px;
  border: 1.5px solid var(--accent-line);
  background: var(--accent-tint);
  border-radius: var(--radius-card);
  text-align: center;
}

.suggestion-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.tag-chip {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--accent-hover);
  border: 1.5px solid var(--accent-line);
}

.tag-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.tag-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
}

.tag-checkbox input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.meal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.meal-info {
  min-width: 0;
}

.meal-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  word-break: break-word;
}

.meal-card .tag-row {
  justify-content: flex-start;
  margin-top: 6px;
}

.meal-delete {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meal-delete:hover {
  color: var(--error);
  background: rgba(192, 57, 43, 0.08);
}

.meal-delete:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.empty-state {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 30px 16px;
}

.empty-illustration {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
}

.empty-state p {
  margin: 0;
}

@media (min-width: 480px) {
  .btn-row {
    flex-direction: row;
  }

  .primary-btn {
    width: auto;
  }

  .add-section .btn-row .primary-btn,
  .suggest-section .btn-row .primary-btn {
    flex: 1;
  }
}
