:root {
  --bg-top: #f6efe4;
  --bg-bottom: #f0c98a;
  --ink: #21160d;
  --subtle: #755a43;
  --card: rgba(255, 248, 239, 0.86);
  --accent: #d4552d;
  --accent-deep: #9e2c0f;
  --accent-soft: #ffe3c5;
  --line: rgba(33, 22, 13, 0.12);
  --shadow: 0 24px 60px rgba(75, 41, 10, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SUIT", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.6), transparent 36%),
    radial-gradient(circle at bottom right, rgba(185, 79, 19, 0.22), transparent 28%),
    linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
}

body::before {
  width: 280px;
  height: 280px;
  top: 5%;
  right: -60px;
  background: rgba(255, 231, 196, 0.5);
  filter: blur(8px);
}

body::after {
  width: 220px;
  height: 220px;
  left: -40px;
  bottom: 8%;
  background: rgba(212, 85, 45, 0.14);
  filter: blur(6px);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

.hero-card,
.result-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 36px;
  animation: rise-in 0.8s ease;
}

.result-card {
  padding: 32px;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: rise-in 0.95s ease;
}

.eyebrow,
.result-kicker,
.history-title,
.group-title,
label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--subtle);
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Black Han Sans", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h1 {
  margin-top: 10px;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.hero-copy,
.menu-description,
.menu-reason,
.today-label,
.time-label,
.hero-caption,
.result-image-label {
  color: var(--subtle);
}

.hero-copy,
.menu-description {
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-visual {
  position: relative;
  margin: 28px 0 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 42px rgba(63, 32, 7, 0.18);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33, 22, 13, 0.02), rgba(33, 22, 13, 0.3));
  pointer-events: none;
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.82);
  backdrop-filter: blur(10px);
  font-size: 0.93rem;
  font-weight: 800;
}

.result-visual {
  position: relative;
  margin: 14px 0 6px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 40px rgba(68, 36, 9, 0.14);
}

.result-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33, 22, 13, 0.01), rgba(33, 22, 13, 0.28));
  pointer-events: none;
}

.result-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.result-image-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 239, 0.86);
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
  font-weight: 800;
}

.today-panel {
  margin-top: 28px;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid var(--line);
}

.today-label,
.time-label {
  font-size: 0.96rem;
  font-weight: 700;
}

.controls {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

.control-group {
  display: grid;
  gap: 12px;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  color: var(--ink);
}

.mood-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mood-chip,
.primary-btn,
.ghost-btn {
  font: inherit;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mood-chip {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  border: 1px solid rgba(33, 22, 13, 0.1);
  font-weight: 700;
}

.mood-chip.active {
  background: var(--ink);
  color: #fff8ef;
  box-shadow: 0 10px 24px rgba(33, 22, 13, 0.18);
}

.actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  min-height: 54px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 16px 28px rgba(158, 44, 15, 0.24);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.mood-chip:hover {
  transform: translateY(-2px);
}

.menu-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.menu-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 800;
}

.menu-reason {
  font-size: 0.98rem;
  font-weight: 700;
}

.history-panel {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.history-list li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(33, 22, 13, 0.08);
  font-weight: 600;
  color: var(--ink);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 24px 0 32px;
  }

  .hero-card,
  .result-card {
    padding: 24px;
  }

  .result-card {
    min-height: auto;
  }
}
