:root {
  --bg-top: #fdf2f4;
  --bg-bottom: #eef6f1;
  --card: #ffffff;
  --primary: #f0a9bd;
  --primary-dark: #e186a3;
  --accent: #9bd3bb;
  --accent-dark: #74bd9d;
  --text: #5d5760;
  --text-soft: #948e94;
  --shadow: rgba(170, 130, 150, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

header {
  text-align: center;
  padding: 40px 16px 28px;
}

header h1 {
  margin: 0;
  color: #de7e9b;
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(222, 126, 155, 0.18);
}

.cheer {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: #5fa688;
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: 0 4px 14px var(--shadow);
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 26px 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 14px 38px rgba(170, 130, 150, 0.2);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #de7e9b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: #5fa688;
  margin: 4px 0 12px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  color: var(--text-soft);
  flex: 1;
  min-width: 130px;
  gap: 6px;
}

input {
  padding: 12px 14px;
  border: 1.5px solid #f3e3e9;
  border-radius: 14px;
  background: #fffcfd;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: #d8c9d0;
}

input:focus {
  outline: none;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 4px rgba(116, 189, 157, 0.15);
}

button {
  padding: 12px 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px rgba(225, 134, 163, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  align-self: flex-end;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(225, 134, 163, 0.42);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(116, 189, 157, 0.32);
  margin-bottom: 14px;
}

button.secondary:hover {
  box-shadow: 0 10px 22px rgba(116, 189, 157, 0.4);
}

.ingredient-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.ingredient-row input[type="text"] {
  flex: 2;
  min-width: 110px;
}

.ingredient-row input[type="number"] {
  flex: 1;
  min-width: 90px;
}

.ingredient-row button {
  background: #fbe7ec;
  color: #c9748d;
  box-shadow: none;
  padding: 10px 16px;
  font-weight: 500;
}

.ingredient-row button:hover {
  background: #f6d4dd;
  transform: none;
}

.total-calorie {
  font-size: 1.15rem;
  font-weight: 700;
  color: #de7e9b;
  background: #fdf2f4;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 14px;
  margin: 16px 0;
}

.total-calorie span {
  color: #c9486f;
}

.record-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.record-list li {
  background: #fbf7f6;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  border: 1px solid #f6ebee;
  transition: background 0.15s ease;
}

.record-list li:hover {
  background: #fdf2f4;
}

.record-list li button {
  background: transparent;
  color: #cdb3bb;
  font-size: 0.78rem;
  padding: 4px 10px;
  box-shadow: none;
  font-weight: 500;
}

.record-list li button:hover {
  color: #c9486f;
  transform: none;
}

.progress-area {
  margin-top: 16px;
}

.progress-area p {
  font-size: 0.92rem;
  color: var(--text);
}

.progress-bar-bg {
  background: #f3e8ec;
  border-radius: 999px;
  height: 16px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: inset 0 1px 4px rgba(170, 130, 150, 0.18);
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--accent-dark), var(--primary));
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.85rem;
  margin-top: 8px;
  color: var(--text-soft);
}

footer {
  text-align: center;
  padding: 24px;
  color: #c2b3bb;
  font-size: 0.85rem;
}
