* {
  box-sizing: border-box;
}

body.theme-light {
  --bg-start: #ffffff;
  --bg-end: #ffffff;
  --text-main: #0c2340;
  --title: #ffd600;
  --subtitle: #e3f2fd;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.18);
  --border: #b3c8e6;
  --button-bg: #1565c0;
  --button-hover: #0d47a1;
  --message: #0d47a1;
}

body.theme-dark {
  --bg-start: #0b1733;
  --bg-end: #11264f;
  --text-main: #dbe7ff;
  --title: #f2f7ff;
  --subtitle: #b9d0ff;
  --card-bg: #1a2a4f;
  --card-shadow: rgba(0, 0, 0, 0.45);
  --border: #3b5a9c;
  --button-bg: #2a6be0;
  --button-hover: #1f56b8;
  --message: #c9dbff;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end));
  color: var(--text-main);
}

.container {
  width: min(760px, 92%);
  margin: 40px auto;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1 {
  margin: 0;
  color: var(--title);
}

.subtitle {
  margin: 10px 0 20px;
  color: var(--subtitle);
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px var(--card-shadow);
}

.entry-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

input,
textarea,
button {
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 15px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

button {
  background: var(--button-bg);
  color: #ffffff;
  border: none;
  cursor: pointer;
}

button:hover {
  background: var(--button-hover);
}

.draw-button {
  width: 100%;
  margin-top: 12px;
}

.theme-toggle {
  min-width: 98px;
}

.entry-list,
.result-list {
  margin: 0;
  padding-left: 20px;
}

.partner-form {
  display: grid;
  gap: 10px;
}

.entry-list li,
.result-list li {
  margin: 6px 0;
}

.message {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--message);
}

.creator {
  margin: 28px 0 0;
  text-align: center;
  font-size: 48px;
  font-weight: 800;
  color: var(--text-main);
}

@media (max-width: 640px) {
  .header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .entry-form {
    grid-template-columns: 1fr;
  }

  .creator {
    font-size: 34px;
  }
}
