:root {
  --bg: #0b1220;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --shadow: rgba(0, 0, 0, 0.35);

  --dial-h: clamp(240px, 46vh, 340px);
  --dial-w: clamp(128px, 28vw, 176px);
  --item-h: 44px;
  --pad-y: calc((var(--dial-h) - var(--item-h)) / 2);

  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden; /* prevent page scrolling (dials scroll independently) */
  background:
    radial-gradient(1000px 500px at 50% 0%, rgba(120, 160, 255, 0.18), transparent 60%),
    radial-gradient(900px 600px at 10% 100%, rgba(190, 120, 255, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.app {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  gap: 16px;
}

.header {
  text-align: center;
  max-width: 560px;
}

.title {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(22px, 4.2vw, 30px);
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.picker-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 4vw, 18px);
  align-items: start;
  padding: clamp(14px, 3.5vw, 18px);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 40px var(--shadow);
}

.dial-block {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.dial-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  user-select: none;
}

.dial {
  width: var(--dial-w);
  height: var(--dial-h);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  position: relative;
  scrollbar-width: none; /* Firefox */
}

.dial::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.dial::before,
.dial::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}

.dial::before {
  top: 0;
  height: 42%;
  background: linear-gradient(to bottom, rgba(11, 18, 32, 0.95), rgba(11, 18, 32, 0));
}

.dial::after {
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(11, 18, 32, 0.95), rgba(11, 18, 32, 0));
}

.dial-spacer {
  height: var(--pad-y);
}

.dial-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dial-item {
  height: var(--item-h);
  scroll-snap-align: center;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.72);
  user-select: none;
  cursor: default;
}

.dial-item.is-selected {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 650;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.14);
}

.center-highlight {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  height: var(--item-h);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 3;
}

.footer {
  height: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 420px) {
  :root {
    --dial-w: min(46vw, 164px);
  }
  .picker-shell {
    gap: 10px;
    padding: 14px 12px;
  }
}
