:root {
  --primary: #E85D4A;
  --primary-deep: #B63A2A;
  --primary-light: #FFCEC3;
  --bg: #FAF7F5;
  --surface: #ffffff;
  --text: #221814;
  --muted: #8F8078;
  --danger: #D94545;
  --accent: #2DB88A;
  --stroke: #EFEAE6;
  --chip: #E6E0DC;
  --nav-h: 64px;
  --max: 720px;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button, input, textarea, select { font: inherit; color: inherit; }

a { color: var(--primary-deep); }

.boot {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.column {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 28px);
}

h1, h2, h3, p { margin: 0; }

h1 { font-size: 32px; letter-spacing: -0.03em; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }

.muted, .caption { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); white-space: pre-wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
}

.field, .area, .search input, select.field {
  width: 100%;
  border: 0;
  background: #FBF5F2;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 48px;
}

.area { min-height: 140px; resize: vertical; }

.btn {
  min-height: 48px;
  border-radius: 14px;
  border: 0;
  padding: 12px 16px;
  font-weight: 650;
  cursor: pointer;
}

.btn.primary { background: var(--primary); color: white; }
.btn.secondary { background: var(--chip); color: var(--text); }
.btn.danger { background: var(--danger); color: white; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn:disabled { opacity: 0.55; }
.btn.block { width: 100%; }
.btn.on { background: var(--primary); color: white; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip {
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  background: var(--primary-light);
  color: var(--primary-deep);
  white-space: nowrap;
  font-weight: 650;
  font-size: 13px;
}
.chip.on { border-color: var(--primary-deep); }

.recipe-row, .shop-row {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 10px;
  min-height: 76px;
}

.shop-row { grid-template-columns: auto 56px 1fr auto; }

.thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
}

.thumb img { width: 56px; height: 56px; object-fit: cover; display: block; }

.score {
  min-width: 44px;
  text-align: center;
  background: var(--chip);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
}

.title { font-weight: 700; font-size: 16px; }

.hero {
  height: 240px;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  margin: -16px -16px 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  display: grid;
  place-items: center;
  color: white;
  font-size: 64px;
}

.hero img { width: 100%; height: 240px; object-fit: cover; display: block; }

.rating { display: flex; gap: 8px; }
.rating button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid var(--c, var(--primary));
  background: transparent;
  color: var(--c, var(--primary));
  font-weight: 700;
}
.rating button.on { background: var(--c, var(--primary)); color: white; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--stroke);
  z-index: 20;
}

.tabbar-inner {
  height: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
}

.tabbar a {
  flex: 1;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-height: 48px;
}

.tabbar a.active { color: var(--primary); }

.login-layout {
  min-height: 100vh;
  background:
    linear-gradient(#E85D4A, #B63A2A) top / 100% 280px no-repeat,
    var(--bg);
}

.login-wrap {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 72px 20px 40px;
  color: white;
}

.login-wrap .card { color: var(--text); margin-top: 28px; }
.login-wrap h1 { font-size: 40px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 12px);
  transform: translateX(-50%);
  background: #221814;
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  z-index: 40;
  max-width: min(90vw, 420px);
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal {
  width: min(100%, 420px);
  background: white;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list { display: flex; flex-direction: column; gap: 8px; }
.check { width: 28px; height: 28px; }

pre.output {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
}

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: #D94545;
  color: white;
  z-index: 50;
}

#blazor-error-ui .dismiss { float: right; cursor: pointer; }

@media (min-width: 900px) {
  body { background: #f3ece8; }
  .column, .login-wrap { padding-top: 28px; }
  .hero { border-radius: 32px; margin: 0 0 8px; }
}
