*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

#pac {
  font-family: 'Noto Sans JP', -apple-system, sans-serif;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  color: #1a1a1a;
}

.pac-head { text-align: center; margin-bottom: 32px; }
.pac-head h1 { font-size: 1.4rem; font-weight: 900; margin-bottom: 8px; }
.pac-head p { font-size: 0.9rem; color: #666; }

.pac-form { display: flex; flex-direction: column; gap: 20px; }

.pac-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #555;
}

.pac-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pac-options.three { grid-template-columns: repeat(3, 1fr); }

.pac-opt {
  padding: 12px 8px;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  font-family: inherit;
  font-weight: 400;
}
.pac-opt:hover { border-color: #E89B5C; }
.pac-opt.selected { border-color: #E89B5C; background: #fdf7f2; font-weight: 700; }

.pac-age-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pac-age-input {
  width: 100px;
  padding: 12px 16px;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  color: #1a1a1a;
  appearance: none;
}
.pac-age-input:focus { outline: none; border-color: #E89B5C; }
.pac-age-unit { font-size: 0.95rem; color: #666; }
.pac-age-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.pac-age-btn:hover { border-color: #E89B5C; }

.pac-calc-btn {
  width: 100%;
  padding: 16px;
  background: #E89B5C;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  margin-top: 8px;
}
.pac-calc-btn:hover { background: #d88a4b; }

.pac-result {
  margin-top: 28px;
  padding: 24px;
  background: #fdf7f2;
  border-radius: 12px;
  text-align: center;
  animation: pacFadeIn 0.4s ease;
}
@keyframes pacFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pac-result-age {
  font-size: 3rem;
  font-weight: 900;
  color: #E89B5C;
  line-height: 1;
  margin-bottom: 6px;
}
.pac-result-age span { font-size: 1.2rem; }
.pac-result-stage {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.stage-young { background: #e0f7e0; color: #060; }
.stage-adult { background: #e0f0ff; color: #006; }
.stage-senior { background: #fff8e0; color: #660; }
.stage-elder { background: #fff0e0; color: #c60; }
.stage-super { background: #ffe0e0; color: #c00; }

.pac-result-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 16px;
}

.pac-result-tip {
  font-size: 0.85rem;
  background: #fff;
  border-left: 3px solid #E89B5C;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  text-align: left;
  line-height: 1.6;
  color: #444;
}

.pac-related {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pac-related a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.88rem;
  background: #fff;
  transition: border-color 0.15s;
}
.pac-related a:hover { border-color: #E89B5C; }
.pac-related a::before { content: '→'; color: #E89B5C; }