*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-alt: #f7f9ff;
  --text: #0f172a;
  --muted: #5c6478;
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --outline: #e2e8f0;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #f8fbff 0%, #eef2ff 30%, #ffffff 70%);
  color: var(--text);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 28px 0 80px;
}

.site-header {
  background: linear-gradient(120deg, #1d4ed8, #3b82f6);
  color: #ffffff;
  padding: 32px 0 24px;
  box-shadow: 0 12px 32px rgba(30, 64, 175, 0.3);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  text-align: center;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 1.2rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.status-pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 1rem;
  font-weight: 600;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
}

.panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--outline);
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: var(--surface-alt);
  color: var(--primary-dark);
  font-weight: 600;
  cursor: pointer;
}

.chat-window {
  min-height: 360px;
  max-height: 520px;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid var(--outline);
  padding: 16px;
  background: #f8faff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

input[type="text"] {
  flex: 1 1 auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.muted {
  color: var(--muted);
}

.hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-message {
  max-width: 80%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.chat-user {
  align-self: flex-end;
  background: #1d4ed8;
  color: #fff;
}

.chat-assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--outline);
  color: var(--text);
}

.summary-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-block h2,
.summary-block h3,
.summary-block h4 {
  margin-bottom: 10px;
}

.summary-card {
  border-radius: 16px;
  border: 1px solid var(--outline);
  padding: 16px;
  background: var(--surface-alt);
}

.recipe-visual {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--outline);
  max-height: 280px;
}

.recipe-visual img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.recipe-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.list {
  padding-left: 18px;
  margin: 0;
}

.tips {
  margin-top: 16px;
  padding: 12px 16px;
  background: #eef2ff;
  border-radius: 12px;
  color: #394073;
}

.status {
  margin-top: 12px;
  color: #0f766e;
  font-weight: 600;
}

.stack {
  display: grid;
  gap: 12px;
}

.restaurant-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--outline);
  background: #ffffff;
}

.restaurant-card a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.hidden {
  display: none;
}

.subscription-panel {
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: #f5f9ff;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.plan-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--outline);
  padding: 16px;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.plan-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.plan-card .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.plan-highlight {
  border: 2px solid rgba(59, 130, 246, 0.4);
  transform: translateY(-4px);
}

.plan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.plan-button:hover {
  background: var(--primary-dark);
}

@media (max-width: 960px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .chat-window {
    max-height: 440px;
  }
}

@media (max-width: 600px) {
  .chat-row {
    flex-direction: column;
  }

  .chat-message {
    max-width: 100%;
  }
}