* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, 0.96);
  --text: #121826;
  --muted: #778195;
  --line: #e7ebf2;
  --accent: #4c6fff;
  --accent-soft: #edf1ff;
  --shadow: 0 22px 60px rgba(28, 39, 65, 0.10);
  --item-h: 52px;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top, #ffffff 0, #f7f9fc 40%, var(--bg) 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 880px);
}

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(231, 235, 242, 0.95);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 42px;
  text-align: center;
  backdrop-filter: blur(18px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.subtitle {
  max-width: 620px;
  margin: 14px auto 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.roller-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fbfcfe;
  padding: 15px 14px 16px;
  margin-top: 8px;
}

.wheel-group {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 74px 104px 92px 22px 74px 74px 74px;
  justify-content: center;
  gap: 6px;
}

.wheel-block {
  min-width: 0;
}

.wheel-label {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.wheel-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 30px;
  color: #b2b8c5;
  font-size: 28px;
  font-weight: 700;
}

.wheel {
  height: calc(var(--item-h) * 5);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  touch-action: pan-y;
}

.wheel::-webkit-scrollbar {
  display: none;
}

.wheel::before,
.wheel::after {
  content: "";
  display: block;
  height: calc(var(--item-h) * 2);
}

.wheel-item {
  height: var(--item-h);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  color: #a0a8b8;
  font-size: 18px;
  font-weight: 650;
  user-select: none;
  cursor: pointer;
  transition: transform .16s ease, color .16s ease, opacity .16s ease;
}

.wheel-item.selected {
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
}

.selection-band {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(15px + 30px + (var(--item-h) * 2));
  height: var(--item-h);
  border-top: 1px solid #dce2ed;
  border-bottom: 1px solid #dce2ed;
  background: linear-gradient(90deg, rgba(76,111,255,0.00), rgba(76,111,255,0.055), rgba(76,111,255,0.00));
  z-index: 1;
  pointer-events: none;
}

.result-panel {
  margin-top: 22px;
  padding: 25px 22px 22px;
  border-radius: 22px;
  background: #111827;
  color: #fff;
}

.result-label {
  display: block;
  font-size: 11px;
  letter-spacing: .13em;
  font-weight: 800;
  color: #9da7b8;
  margin-bottom: 10px;
}

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

#julianOutput {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: clamp(27px, 5vw, 42px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.035em;
  word-break: break-all;
}

#copyBtn {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .18s ease;
}

#copyBtn:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

#copyBtn.copied {
  background: #1f9d62;
}

#copyBtn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.date-preview {
  margin-top: 10px;
  color: #aeb7c7;
  font-size: 13px;
}

.now-button {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  border-radius: 13px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}

.now-button:hover {
  background: #f7f8fb;
  border-color: #dbe1eb;
  transform: translateY(-1px);
}

.footnote {
  margin: 16px 0 0;
  color: #98a1b1;
  font-size: 12px;
  line-height: 1.5;
}




.button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button-row .now-button {
  margin-top: 0;
}

@media (max-width: 720px) {
  body {
    padding: 12px;
  }

  .card {
    padding: 28px 14px 22px;
    border-radius: 22px;
  }

  .subtitle {
    margin-bottom: 20px;
  }

  .roller-wrap {
    overflow-x: auto;
    padding-inline: 10px;
  }

  .wheel-group {
    width: 560px;
    grid-template-columns: 64px 94px 82px 16px 64px 64px 64px;
    gap: 4px;
  }

  .selection-band {
    left: 10px;
    right: 10px;
  }

  .result-panel {
    padding-inline: 12px;
  }

  #julianOutput {
    font-size: clamp(24px, 8vw, 34px);
  }
}
