
@charset "UTF-8";

@charset "UTF-8";

#unsei-app {
  --paper-0: #fbfaf6;
  --paper-1: #ffffff;
  --paper-2: #f6f3ea;
  --ink-0: #1c1a16;
  --ink-1: #3a342a;
  --ink-2: #6a6253;
  --gold-0: #d8b464;
  --gold-1: #b88c2a;
  --gold-2: #8d6b1e;
  --line: rgba(0, 0, 0, 0.08);
  --soft-line: rgba(0, 0, 0, 0.05);
  --shadow-0: 0 14px 34px rgba(0, 0, 0, 0.08);
  --radius-0: 14px;
  --radius-1: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  position: relative;
  min-height: 100vh;
  padding: clamp(52px, 6vw, 86px) 0 clamp(80px, 8vw, 120px);
  color: var(--ink-0);
  background: linear-gradient(180deg, var(--paper-1), var(--paper-0) 50%, var(--paper-2) 100%);
  font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  overflow-y: visible;
  touch-action: auto;
  -webkit-overflow-scrolling: touch;
}

#unsei-app *,
#unsei-app *::before,
#unsei-app *::after {
  box-sizing: border-box;
}

#unsei-app .washi {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/></filter><rect width='220' height='220' filter='url(%23n)' opacity='0.35'/></svg>");
  mix-blend-mode: multiply;
  z-index: 0;
}

#unsei-app .cloud {
  pointer-events: none;
  position: absolute;
  width: min(520px, 70vw);
  aspect-ratio: 3/1.2;
  opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='240' viewBox='0 0 600 240'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='0'><stop offset='0' stop-color='%23d8b464' stop-opacity='0.32'/><stop offset='0.5' stop-color='%23b88c2a' stop-opacity='0.28'/><stop offset='1' stop-color='%23d8b464' stop-opacity='0.32'/></linearGradient></defs><path fill='url(%23g)' d='M40 140c30-30 80-40 120-20 20-40 80-60 140-40 20-30 70-50 120-20 30 20 60 20 100 0 20-10 40-20 60-10v60H0v-30c10-10 25-20 40-40z'/><path fill='url(%23g)' d='M120 70c30-20 70-25 110-10 25-25 70-35 110-20 25-20 65-25 95-5 20 15 40 15 65 5 20-8 35-15 55-10v35H70c10-15 25-25 50-35z'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  z-index: 0;
}
#unsei-app .cloud.c1 { top: -30px; right: -60px; transform: rotate(-2deg); }
#unsei-app .cloud.c2 { bottom: -40px; left: -70px; transform: rotate(2deg); }

#unsei-app .shell {
  position: relative;
  z-index: 1;
  width: min(1020px, 94vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#unsei-app .hero {
  position: sticky;
  top: clamp(0px, 2vh, 12px);
  z-index: 4;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82));
  backdrop-filter: blur(2px);
  border-bottom: 1px solid var(--soft-line);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

#unsei-app .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: rgba(216, 180, 100, 0.10);
  border: 1px solid rgba(216, 180, 100, 0.35);
  color: var(--ink-1);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
#unsei-app .eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-0), var(--gold-1));
  box-shadow: 0 0 0 3px rgba(216, 180, 100, 0.18);
}

#unsei-app h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.16;
  font-weight: 700;
  color: var(--ink-0);
}
#unsei-app .hero-subtitle {
  margin: 0;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.6;
  color: var(--ink-2);
  letter-spacing: 0.05em;
}

#unsei-app .stage {
  position: relative;
  overflow: visible;
  min-height: 560px;
}

#unsei-app .panel {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
    linear-gradient(180deg, rgba(216, 180, 100, 0.06), transparent 45%);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius-1);
  box-shadow: var(--shadow-0);
  padding: clamp(22px, 3vw, 32px);
  transition: transform 0.8s var(--ease), opacity 0.6s var(--ease);
  touch-action: pan-y;
}

#unsei-app .panel--form { transform: translateX(0); }
#unsei-app .panel--result {
  position: relative;
  inset: auto;
  transform: translateY(12px);
  opacity: 0;
  display: none;
}

#unsei-app.show-result .panel--form {
  display: none;
}
#unsei-app.show-result .panel--result {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

#unsei-app .section-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--ink-1);
}

#unsei-app .divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(184, 140, 42, 0.45), transparent);
  margin: 12px 0 8px;
}

#unsei-app .direct-input-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 12px auto 14px;
  padding: 0 10px;
  flex-wrap: wrap;
}
#unsei-app .direct-input-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#unsei-app .direct-input-field {
  width: 56px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(184, 140, 42, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 243, 234, 0.92));
  color: var(--ink-1);
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--ease);
  appearance: textfield;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}
#unsei-app #input-year { width: 82px; }
#unsei-app .direct-input-field:focus {
  outline: none;
  border-color: var(--gold-1);
  box-shadow: 0 0 0 3px rgba(216, 180, 100, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
#unsei-app .direct-input-label {
  font-size: 30px;
  font-weight: 600;
  color: var(--ink-2);
}
#unsei-app .direct-input-field::-webkit-outer-spin-button,
#unsei-app .direct-input-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#unsei-app .date-wheel {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 480px;
  height: 220px;
  margin: 14px auto 10px;
  background: linear-gradient(180deg, #fdfbf7 0%, #f4efe2 100%);
  border: 1px solid #e4dcc8;
  border-radius: 18px;
  overflow: hidden;
  color: #3a3f4d;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  perspective: 900px;
  box-shadow:
    0 18px 40px rgba(28, 38, 64, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(215, 219, 230, 0.7);
  user-select: none;
  touch-action: pan-y;
}
#unsei-app .date-wheel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.85));
  pointer-events: none;
  z-index: 1;
}
#unsei-app .date-wheel__column {
  flex: 1;
  position: relative;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y proximity;
  scroll-snap-stop: normal;
  scroll-padding: var(--wheel-padding, 80px) 0;
  touch-action: pan-y;
  overscroll-behavior-y: auto;
  overscroll-behavior-x: contain;
  padding: var(--wheel-padding, 80px) 0;
  scrollbar-width: none;
  transform-style: preserve-3d;
  transform: translateZ(0);
  cursor: grab;
}
#unsei-app .date-wheel__column:active { cursor: grabbing; }
#unsei-app .date-wheel__column::-webkit-scrollbar { display: none; }

#unsei-app .date-wheel__item {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #2f323c;
  opacity: 0.6;
  transition: opacity 0.12s ease, color 0.12s ease;
  touch-action: pan-y;
  scroll-snap-align: center;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
#unsei-app .date-wheel__item--selected {
  opacity: 1;
  color: inherit;
  -webkit-text-fill-color: currentColor;
  font-weight: 700;
  position: relative;
  z-index: 6;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.9),
    0 3px 8px rgba(0, 0, 0, 0.18);
}
#unsei-app .date-wheel__highlight { display: none; }

#unsei-app .picker-display {
  text-align: center;
  font-weight: 700;
  color: var(--ink-0);
  font-size: 15px;
}

#unsei-app .gender-select {
  display: flex;
  gap: 12px;
  justify-content: center;
  font-size: 16px;
  padding: 6px 0 4px;
  flex-wrap: wrap;
}
#unsei-app .gender-select label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-0);
  border: 1px solid var(--line);
  background: rgba(216, 180, 100, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
#unsei-app .gender-select input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #c27a2d;
}

#unsei-app .button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

#unsei-app .btn {
  position: relative;
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid rgba(184, 140, 42, 0.6);
  background: linear-gradient(135deg, #d8b464, #b88c2a);
  color: #fff;
  cursor: pointer;
  width: min(320px, 100%);
  letter-spacing: 0.08em;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s ease;
  box-shadow: 0 12px 26px rgba(184, 140, 42, 0.22);
}
#unsei-app .btn:hover { transform: translateY(-1px); filter: brightness(1.02); }
#unsei-app .btn:active { transform: translateY(1px) scale(0.995); }
#unsei-app .btn.is-pressing { animation: btn-press 0.45s var(--ease); }
#unsei-app .btn.secondary {
  background: linear-gradient(135deg, #f7f3e9, #f0e7d7);
  color: var(--ink-1);
  border-color: var(--line);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

#unsei-app .inline-message {
  min-height: 20px;
  color: #c84b31;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
  margin-top: 6px;
}

#unsei-app .result-header {
  text-align: center;
  margin-bottom: 12px;
}
#unsei-app .result-header .label {
  color: var(--ink-2);
  font-size: 13px;
}
#unsei-app .result-header .value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}

#unsei-app .result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
#unsei-app .result-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(18px);
  animation: card-pop 0.65s var(--ease) forwards;
}
#unsei-app .result-card .title {
  font-size: 13px;
  color: #6a3b2b;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
#unsei-app .result-card .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-0);
}

#unsei-app .guidance {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
#unsei-app .guidance-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff7ef;
  border: 1px solid #f0d7b9;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  animation: card-pop 0.65s var(--ease) forwards;
}
#unsei-app .guidance-item:empty { display: none; }

#unsei-app .actions-inline {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

@keyframes card-pop {
  0% { opacity: 0; transform: translateY(22px) scale(0.98); }
  55% { opacity: 1; transform: translateY(-6px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes btn-press {
  0% { transform: translateY(0); box-shadow: 0 12px 26px rgba(184, 140, 42, 0.22); }
  50% { transform: translateY(2px) scale(0.995); box-shadow: 0 8px 16px rgba(184, 140, 42, 0.18); }
  100% { transform: translateY(0); box-shadow: 0 12px 26px rgba(184, 140, 42, 0.22); }
}

@media (max-width: 640px) {
  #unsei-app {
    padding: 42px 0 80px;
  }
  #unsei-app .panel { padding: 18px 16px 22px; }
  #unsei-app .stage {
    min-height: auto;
    overflow: visible;
  }
  #unsei-app .hero-subtitle { display: none; }
  #unsei-app .panel--result {
    display: none;
    transform: translateY(12px);
    opacity: 0;
  }
  #unsei-app.show-result .panel--result {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }
  #unsei-app.show-result .panel--form {
    display: none;
  }
  #unsei-app .section-title {
    font-size: 16px;
  }
  #unsei-app .direct-input-container {
    gap: 8px;
    margin: 10px auto 12px;
  }
  #unsei-app .direct-input-field {
    width: 52px;
    height: 46px;
    font-size: 24px;
  }
  #unsei-app #input-year {
    width: 72px;
  }
  #unsei-app .direct-input-label {
    font-size: 24px;
  }
  #unsei-app .result-header .value {
    font-size: 18px;
  }
}
