:root {
  --bg: #fff8f0;
  --card: #ffffff;
  --accent: #e65a32;
  --accent-dark: #c94a26;
  --text: #1f2937;
  --muted: #6b7280;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(230, 90, 50, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; background: rgba(255,248,240,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid #fde8d8;
}
.logo { font-weight: 800; font-size: 1.2rem; color: var(--accent); }
.nav { display: flex; gap: .75rem; font-size: .9rem; }
.nav a.active { font-weight: 700; color: var(--accent-dark); }
main { padding: 1rem; max-width: 640px; margin: 0 auto 4rem; }
.site-footer { text-align: center; padding: 1rem; color: var(--muted); font-size: .8rem; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow); margin-bottom: 1rem;
}
h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); font-size: .9rem; }
.muted.warn { color: #b45309; }
.key-panel { margin-top: .75rem; display: flex; flex-direction: column; gap: .35rem; }
.key-panel .btn { margin-top: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: .75rem 1.25rem; font-weight: 700; cursor: pointer; width: 100%;
  font-size: 1rem; margin-top: .5rem;
}
.btn.secondary { background: #374151; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, textarea, select {
  width: 100%; padding: .7rem .85rem; border: 1px solid #e5e7eb;
  border-radius: 12px; font: inherit; margin: .35rem 0 .75rem;
}
textarea { min-height: 80px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.chip {
  border: 1px solid #fcd9c5; background: #fff5ee; color: var(--accent-dark);
  padding: .35rem .75rem; border-radius: 999px; font-size: .85rem; cursor: pointer;
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.wheel-wrap { text-align: center; padding: 1rem 0; }
.wheel {
  width: 220px; height: 220px; margin: 0 auto 1rem; border-radius: 50%;
  background: conic-gradient(from 0deg, #e65a32, #f59e0b, #10b981, #3b82f6, #8b5cf6, #e65a32);
  display: grid; place-items: center; transition: transform 2.5s cubic-bezier(.2,.8,.2,1);
  box-shadow: var(--shadow);
}
.wheel-inner {
  width: 150px; height: 150px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; font-weight: 800; padding: .5rem; text-align: center;
}
.result-box {
  font-size: 1.25rem; font-weight: 800; color: var(--accent-dark);
  min-height: 2rem; margin: .5rem 0;
}
.feed-grid { display: grid; gap: 1rem; }
.post-card img { width: 100%; border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; background: #f3f4f6; }
.img-grid { display: grid; gap: 4px; margin: .5rem 0; border-radius: 12px; overflow: hidden; }
.img-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; border-radius: 0; margin: 0; }
.img-grid.grid-1 { grid-template-columns: 1fr; }
.img-grid.grid-1 img { aspect-ratio: 4/3; }
.img-grid.grid-4 { grid-template-columns: 1fr 1fr; }
.img-grid.grid-n { grid-template-columns: repeat(3, 1fr); }
.moments { display: flex; flex-direction: column; gap: 1rem; }
.profile-header code { font-size: .8rem; background: #f3f4f6; padding: .1rem .35rem; border-radius: 4px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; }
.tagline { font-size: .75rem; color: var(--muted); }
.react-row { display: flex; gap: .5rem; margin-top: .5rem; }
.react-row button { flex: 1; }
.ai-badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  padding: .15rem .45rem; border-radius: 6px; margin-left: .35rem;
  background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
}
.official { font-size: .7rem; background: #fef3c7; color: #92400e; padding: .15rem .5rem; border-radius: 6px; }
#toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: .65rem 1rem; border-radius: 999px; font-size: .9rem;
}
.recipe-list article { border-top: 1px solid #f3f4f6; padding: .75rem 0; }
.recipe-list h3 { margin: 0 0 .25rem; font-size: 1rem; }
@media (min-width: 768px) {
  main { padding: 1.5rem; }
}
