:root {
  color-scheme: light;
  --ink: #1a1b1f;
  --paper: #f6f0e6;
  --accent: #ef5a2f;
  --accent-dark: #c84621;
  --subtle: #5a5d66;
  --glass: rgba(255, 255, 255, 0.7);
  --shadow: 0 24px 60px rgba(26, 27, 31, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Shippori Mincho", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 20%, #ffd7a2 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, #b7f3e6 0%, transparent 40%),
    radial-gradient(circle at 50% 70%, #ffe2e9 0%, transparent 55%),
    var(--paper);
  min-height: 100vh;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  display: grid;
  gap: 40px;
}

.hero {
  display: grid;
  gap: 16px;
}

h1 {
  font-family: "Shippori Mincho", serif;
  font-size: clamp(32px, 6vw, 64px);
  margin: 0;
}

#pageTitle {
  cursor: pointer;
}

.panel {
  background: var(--glass);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.panel-body {
  padding: 32px 32px 28px;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.result-intro {
  margin: 0;
  font-size: 18px;
  color: var(--subtle);
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.primary {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  width: clamp(260px, 48vw, 460px);
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 12px 24px rgba(239, 90, 47, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
}

.secondary {
  border: 1px solid rgba(26, 27, 31, 0.2);
  border-radius: 999px;
  padding: 14px 24px;
  width: clamp(260px, 48vw, 460px);
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(26, 27, 31, 0.08);
}

.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(26, 27, 31, 0.12);
}

.primary:hover {
  transform: translateY(-2px) scale(1.01);
  background: var(--accent-dark);
  box-shadow: 0 16px 30px rgba(239, 90, 47, 0.35);
}

.primary:active {
  transform: translateY(0) scale(0.99);
}

.chip {
  padding: 10px 16px;
  background: #fff;
  border-radius: 16px;
  font-size: 16px;
  color: #373942;
  min-width: 240px;
  box-shadow: inset 0 0 0 1px rgba(26, 27, 31, 0.06);
}

.result-blocks {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.result-blocks.is-hidden {
  display: none;
}

.result-blocks .chip {
  min-width: 160px;
  text-align: center;
}

.chip-large,
#prefectureChip {
  font-size: clamp(24px, 4.6vw, 40px);
  padding: 16px 22px;
  font-weight: 600;
}

.result-joiner {
  font-size: 14px;
  color: var(--subtle);
}

.result-blocks.is-spinning .chip {
  animation: roulettePulse 0.5s ease-in-out infinite;
}

.result-blocks.is-spinning .result-joiner {
  opacity: 0.4;
}

.meta {
  font-size: 13px;
  color: var(--subtle);
}


@media (max-width: 720px) {
  .page {
    padding: 56px 20px 52px;
  }

  .panel-body {
    padding: 24px;
  }

  .chip {
    width: 100%;
  }

  .result-blocks {
    width: 100%;
  }

  .result-blocks .chip {
    width: 100%;
    text-align: left;
  }

  .result-joiner {
    display: none;
  }

  .primary {
    width: 100%;
  }

  .secondary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: fadeIn 0.7s ease forwards;
  }

  .panel {
    animation: riseIn 0.8s ease forwards;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes roulettePulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

