:root {
  --bg: #f6efe6;
  --panel: rgba(255, 251, 247, 0.88);
  --text: #1d1b1a;
  --muted: #6b635d;
  --line: rgba(48, 40, 33, 0.12);
  --red: #c61f31;
  --blue: #1767b1;
  --accent: #efb75e;
  --shadow: 0 18px 50px rgba(66, 44, 22, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 183, 94, 0.45), transparent 32%),
    radial-gradient(circle at bottom right, rgba(23, 103, 177, 0.18), transparent 26%),
    linear-gradient(145deg, #f8f1e7, #efe4d3 55%, #f7f3ee);
  display: grid;
  place-items: center;
  padding: 24px;
}

.app {
  width: min(1080px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.hero {
  padding: 40px 32px 28px;
  background:
    linear-gradient(135deg, rgba(198, 31, 49, 0.94), rgba(132, 16, 35, 0.92)),
    linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.08));
  color: #fff7f2;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(4px);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 247, 242, 0.88);
  font-size: 1rem;
}

.content {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 28px;
}

.card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card p,
.hint,
.summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.controls {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.9rem;
  font-weight: 700;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, var(--red), #8c1223);
  color: white;
  box-shadow: 0 14px 30px rgba(140, 18, 35, 0.22);
}

.secondary {
  background: rgba(23, 103, 177, 0.1);
  color: var(--blue);
  border: 1px solid rgba(23, 103, 177, 0.18);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.tickets {
  display: grid;
  gap: 14px;
}

.ticket {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 241, 232, 0.92));
  animation: rise 320ms ease both;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

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

.ball {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.12);
}

.ball.red {
  background: radial-gradient(circle at 30% 30%, #eb7080, var(--red) 60%, #8f1121);
}

.ball.blue {
  background: radial-gradient(circle at 30% 30%, #67a9e6, var(--blue) 62%, #10487c);
}

.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(239, 183, 94, 0.18);
  color: #6d4b11;
}

.empty {
  border: 1px dashed rgba(48, 40, 33, 0.2);
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.44);
}

.footnote {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-wrap {
  padding: 0 28px 28px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 24px;
  align-items: start;
}

.contact-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(23, 103, 177, 0.1);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-copy h2 {
  margin-bottom: 10px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form textarea {
  min-height: 140px;
}

.contact-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .content {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 32px 22px 24px;
  }

  .content {
    padding: 18px;
  }

  .contact-wrap {
    padding: 0 18px 18px;
  }

  .contact {
    grid-template-columns: 1fr;
  }
}
