:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --sub: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-press: #1d4ed8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR",
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
}

header {
  padding: 2rem 0 1.5rem;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.subtitle {
  margin: 0.4rem 0 0;
  color: var(--sub);
}

main {
  padding-bottom: 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.card h2 {
  margin: 0 0 0.9rem;
  font-size: 1.1rem;
}

button {
  border: 0;
  border-radius: 10px;
  font-size: 0.96rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.primary-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.primary-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.primary-btn:active {
  background: var(--primary-press);
}

.slot-help {
  margin: 0 0 1rem;
  color: var(--sub);
}

.slot-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.slot-box {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.7rem;
  text-align: center;
}

.slot-box small {
  color: var(--sub);
  margin-bottom: 0.45rem;
}

.slot-window {
  position: relative;
  width: 100%;
  max-width: 210px;
  height: 90px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #f3f4f6 0%, #ffffff 22%, #ffffff 78%, #f3f4f6 100%);
}

.slot-window.spinning::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 22%,
    rgba(255, 255, 255, 0) 78%,
    rgba(255, 255, 255, 0.5) 100%
  );
  pointer-events: none;
}

.slot-item {
  position: absolute;
  inset-inline: 0;
  text-align: center;
  line-height: 36px;
  height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  padding: 0 0.4rem;
}

.slot-main {
  top: 27px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.slot-faded {
  font-size: 0.95rem;
  color: #6b7280;
  opacity: 0.42;
  filter: blur(1.1px);
}

.slot-tick {
  animation: slotTick 120ms linear;
}

@keyframes slotTick {
  0% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

#slotCountryPrev,
#slotTypePrev,
#slotMenuPrev {
  top: -6px;
}

#slotCountryNext,
#slotTypeNext,
#slotMenuNext {
  top: 60px;
}

.footer {
  padding: 1rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: var(--sub);
}

.footer a {
  color: var(--sub);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.policy {
  padding: 2rem 0;
}

.policy h1 {
  margin-bottom: 1rem;
}

.policy p,
.policy li {
  line-height: 1.6;
  color: #374151;
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1.6rem);
  }

  .card {
    padding: 0.75rem;
  }

  .slot-wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin-bottom: 0.75rem;
  }

  .slot-box {
    min-height: 132px;
    padding: 0.35rem;
  }

  .slot-window {
    height: 90px;
    max-width: 100%;
  }

  .slot-item {
    padding: 0 0.2rem;
  }
}
