:root {
  --bg-start: #fff8ef;
  --bg-end: #ffe5cc;
  --card: #ffffffcc;
  --text: #232323;
  --accent: #ff6a00;
  --accent-dark: #dd5a00;
  --line: #f2d8bc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

.container {
  width: min(92vw, 720px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 16px 40px rgba(56, 24, 0, 0.14);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.8vw, 2rem);
}

.hero p {
  margin: 10px 0 0;
  color: #5a4a3e;
}

.controls {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.controls label {
  font-weight: 700;
}

.controls select,
.controls button {
  border-radius: 10px;
  border: 1px solid #d8d8d8;
  font-size: 1rem;
  padding: 10px 12px;
}

.controls button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.controls button:hover {
  background: var(--accent-dark);
}

.result {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.ticket {
  background: #fff;
  border: 1px solid #f0e2d3;
  border-radius: 14px;
  padding: 12px;
}

.ticket-title {
  font-size: 0.92rem;
  color: #715f4f;
  margin-bottom: 8px;
  font-weight: 700;
}

.numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.range-1-10 { background: #fbc400; }
.range-11-20 { background: #5f9df7; }
.range-21-30 { background: #ff7f50; }
.range-31-40 { background: #8e8e8e; }
.range-41-45 { background: #6fbe44; }

@media (max-width: 520px) {
  .container {
    padding: 20px 16px;
  }

  .ball {
    width: 38px;
    height: 38px;
  }
}
