:root {
  --bg: #fff8e7;
  --bg2: #fffdf6;
  --card: rgba(255, 255, 255, 0.88);
  --card2: #fff3c4;
  --text: #1f2937;
  --muted: #667085;
  --line: rgba(31, 41, 55, 0.09);
  --accent: #2563eb;
  --accent2: #f59e0b;
  --success: #16a34a;
  --danger: #e11d48;
  --shadow: 0 18px 48px rgba(31, 41, 55, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 213, 79, 0.55), transparent 22rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 24rem),
    linear-gradient(180deg, #fff8e7 0%, #f8fbff 48%, #fffdf6 100%);
  min-height: 100vh;
}

.app {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 20px 14px 70px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(255, 248, 231, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 90% 12%, rgba(245, 158, 11, 0.28), transparent 16rem);
}

.eyebrow {
  margin: 0 0 8px;
  color: #b45309;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

h1, h2, p { margin-top: 0; }
h1 {
  font-size: clamp(30px, 7vw, 46px);
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}
h2 { font-size: 18px; margin-bottom: 8px; }
.desc, .sectionHead p, .message, label, small { color: var(--muted); }
.desc { line-height: 1.58; margin-bottom: 0; }

.statusBox {
  min-width: 135px;
  border-radius: 24px;
  background: linear-gradient(160deg, #fff2b8, #ffffff);
  border: 1px solid rgba(245, 158, 11, 0.18);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.statusBox strong { font-size: 34px; margin-top: 14px; color: #111827; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
}
.pill.ok { background: #dcfce7; color: #166534; }
.pill.fail { background: #ffe4e6; color: #be123c; }

.controls { margin-bottom: 14px; }
.grid { display: grid; gap: 14px; }
.two { grid-template-columns: repeat(2, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }

label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; }
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
select:focus { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 0 4px rgba(37,99,235,.10); }

.buttonRow { display: flex; gap: 10px; margin-top: 14px; }
button {
  border: 0;
  border-radius: 17px;
  padding: 13px 15px;
  color: #1f2937;
  font-weight: 950;
  background: #f3f4f6;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
}
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
button.primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  flex: 1;
}
button.ghost { background: #fff7d6; color: #92400e; }
button.danger { color: #be123c; background: #fff1f2; }
.message { margin: 12px 0 0; font-size: 13px; line-height: 1.45; }

.mini { min-height: 122px; }
.mini h2 { display: inline-flex; align-items: center; gap: 6px; }
.mini h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent2);
}
.balls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ball {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,.86);
  box-shadow:
    inset -7px -8px 14px rgba(0,0,0,.16),
    inset 5px 6px 9px rgba(255,255,255,.38),
    0 7px 13px rgba(31, 41, 55, .14);
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
}
.ball-yellow { background: radial-gradient(circle at 32% 28%, #fff6a3, #f59e0b 62%, #b45309); }
.ball-blue { background: radial-gradient(circle at 32% 28%, #b9e7ff, #2563eb 62%, #1e3a8a); }
.ball-red { background: radial-gradient(circle at 32% 28%, #ffc4c4, #ef4444 62%, #991b1b); }
.ball-dark { background: radial-gradient(circle at 32% 28%, #d1d5db, #374151 62%, #111827); }
.ball-green { background: radial-gradient(circle at 32% 28%, #bbf7d0, #16a34a 62%, #166534); }
.smallBalls .ball { width: 37px; height: 37px; font-size: 13px; }

.sectionHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.sectionHead p { margin-bottom: 0; font-size: 13px; }

.recommendations, .recentList, .savedList { display: grid; gap: 12px; }
.empty { color: var(--muted); font-size: 14px; }
.recItem, .recentItem, .savedItem {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.06);
}
.recTop, .savedTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.meta { color: var(--muted); font-size: 13px; line-height: 1.45; }
.actionRow { display: flex; gap: 8px; margin-top: 12px; }
.actionRow button { padding: 10px 12px; font-size: 13px; }

.recentItem { display: grid; gap: 10px; }
.recentTitle { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.savedCard { margin-bottom: 20px; }

@media (max-width: 760px) {
  .app { padding: 14px 12px 56px; }
  .card { border-radius: 24px; padding: 17px; }
  .hero { flex-direction: column; }
  .two, .three { grid-template-columns: 1fr; }
  .buttonRow, .sectionHead { flex-direction: column; }
  .buttonRow button, .sectionHead button { width: 100%; }
  .statusBox { align-items: flex-start; text-align: left; }
  .recTop, .savedTop { align-items: flex-start; flex-direction: column; }
  .ball { width: 43px; height: 43px; }
  .smallBalls .ball { width: 36px; height: 36px; }
}
