* {
  box-sizing: border-box;
}

:root {
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
}

body {
  margin: 0;
  min-height: 100vh;
}

/* Planner */
body.planner {
  background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.2), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(129, 140, 248, 0.2), transparent 45%),
    #0f172a;
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.planner-shell {
  width: min(1000px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.daily-info h2 {
  margin: 0 0 0.8rem;
}

.daily-info ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #334155;
}

.daily-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.daily-columns h3 {
  margin: 0 0 0.4rem;
  color: #111827;
}

.blur-bg {
  position: fixed;
  inset: 10% 5% auto;
  height: 280px;
  background: #312e81;
  filter: blur(160px);
  opacity: 0.35;
  pointer-events: none;
}

.card {
  background: rgba(248, 250, 252, 0.95);
  border-radius: 28px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(12px);
}

.intro {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #818cf8;
}

.intro h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.subtle {
  margin: 0;
  color: #475569;
}

.actions {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.week-switch label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.week-switch div {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.35rem;
}

.week-switch input {
  width: 90px;
  padding: 0.65rem 0.8rem;
  border-radius: 16px;
  border: 1px solid #cdd5f1;
  font-size: 1rem;
  background: #fff;
}

.week-switch button,
button.save,
button[type="submit"] {
  border: none;
  border-radius: 16px;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(135deg, #6366f1, #14b8a6);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 15px 40px rgba(79, 70, 229, 0.25);
  transition: transform 0.15s ease;
}

button.save:hover,
.week-switch button:hover {
  transform: translateY(-1px);
}

.link {
  text-decoration: none;
  font-weight: 600;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.link::after {
  content: "→";
  font-size: 0.9rem;
}

.flash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flash {
  padding: 0.9rem 1.2rem;
  border-radius: 20px;
  background: rgba(74, 222, 128, 0.15);
  color: #166534;
  font-weight: 600;
}

.menu-grid {
  display: grid;
  gap: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.menu-grid .day-card {
  background: #fff;
  border-radius: 22px;
  padding: 1.25rem;
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}

.menu-grid textarea {
  width: 100%;
  min-height: 90px;
  border: none;
  background: #f1f5f9;
  border-radius: 16px;
  padding: 1rem;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.day-label {
  margin: 0 0 0.6rem;
  font-weight: 600;
  color: #0f172a;
}

.menu-grid .save {
  margin-top: 0.5rem;
}

.menu-grid > .save {
  justify-self: end;
}

@media (min-width: 720px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .week-switch div {
    flex-direction: column;
  }

  .menu-grid {
    padding: 1.25rem;
  }
}

/* Today view */
body.today {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  min-height: 100vh;
}

body.today .overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  z-index: 0;
}

.today-card {
  position: relative;
  z-index: 1;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 32px;
  padding: clamp(2rem, 4vw, 3.5rem);
  backdrop-filter: blur(18px);
  max-width: 1600px;
  margin: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.today-card header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.today-card h1 {
  margin: 0.2rem 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.today-card .day {
  margin: 0;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.meta-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.meta-pill span {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tv-layout {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 2.5rem;
  align-items: stretch;
}

.info-column {
  background: rgba(15, 23, 42, 0.45);
  border-radius: 28px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.05rem;
  line-height: 1.6;
}

.info-column h3 {
  margin: 0 0 0.4rem;
  color: #fef9c3;
}

.info-column p {
  margin: 0 0 0.5rem;
}

.info-column ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.dish-panel {
  background: rgba(15, 23, 42, 0.65);
  border-radius: 40px;
  padding: 3rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
}

.dish-label {
  letter-spacing: 0.5em;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin: 0 0 1.5rem;
  color: #c4b5fd;
}

.today-card .dish {
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  margin: 0;
}

@media (max-width: 1100px) {
  .tv-layout {
    grid-template-columns: 1fr;
  }
}

body.today .link {
  color: #fff;
}

.bg-monday {
  background-image: url("https://images.unsplash.com/photo-1466978913421-dad2ebd01d17?auto=format&q=70&w=1600");
  background-size: cover;
  background-position: center;
}

.bg-tuesday {
  background-image: url("https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&q=70&w=1600");
  background-size: cover;
  background-position: center;
}

.bg-wednesday {
  background-image: url("https://images.unsplash.com/photo-1476127396013-7ad58ef897e8?auto=format&q=70&w=1600");
  background-size: cover;
}

.bg-thursday {
  background-image: url("https://images.unsplash.com/photo-1455619452474-d2be8b1e70cd?auto=format&q=70&w=1600");
  background-size: cover;
}

.bg-friday {
  background-image: url("https://images.unsplash.com/photo-1481839690978-08c6d5a6768a?auto=format&q=70&w=1600");
  background-size: cover;
}

.bg-default {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}
