* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
button { touch-action: manipulation; }

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.7;
  overflow-x: hidden;
}

header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #16a34a;
  text-decoration: none;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ━━━ ヒーロー ━━━ */
.hero {
  text-align: center;
  padding: 1.5rem 0 1.25rem;
}
.hero-icon { font-size: 2.8rem; margin-bottom: 0.4rem; }

h1 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.description { color: #666; margin-bottom: 1.5rem; }

/* ━━━ ヒーローバッジ ━━━ */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  display: inline-block;
  padding: 5px 13px;
  background: #dcfce7;
  color: #16a34a;
  border: 1.5px solid #86efac;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ━━━ カード ━━━ */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e0e0e0;
}

/* ━━━ 入力フォーム ━━━ */
.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.4rem;
}

.input-group input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: #fff;
  font-family: inherit;
}

.input-group input:focus {
  outline: none;
  border-color: #16a34a;
}

.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: #15803d; }

/* ━━━ 結果：進捗バー ━━━ */
#result { margin-bottom: 1.5rem; }

.progress-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e0e0e0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.progress-title {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

.progress-text {
  font-size: 0.9rem;
  font-weight: bold;
  color: #16a34a;
}

.progress-track {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

.action-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.45rem 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  font-size: 0.85rem;
  font-family: inherit;
  color: #555;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-sm:hover { border-color: #16a34a; color: #16a34a; }

/* ━━━ マイルストーンカード ━━━ */
.ms-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #d1d5db;
}

.ms-card.ms-done    { border-left-color: #16a34a; background: #f0fdf4; }
.ms-card.ms-due     { border-left-color: #2563eb; background: #eff6ff; }
.ms-card.ms-overdue { border-left-color: #dc2626; background: #fef2f2; }
.ms-card.ms-future  { border-left-color: #d1d5db; }

.ms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ms-labels { display: flex; flex-direction: column; gap: 0.1rem; }

.ms-age {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
}

.ms-date {
  font-size: 0.8rem;
  color: #888;
}

.ms-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-done    { background: #dcfce7; color: #16a34a; }
.badge-due     { background: #dbeafe; color: #2563eb; }
.badge-overdue { background: #fee2e2; color: #dc2626; }
.badge-future  { background: #f3f4f6; color: #6b7280; }

/* ━━━ ワクチン一覧 ━━━ */
.v-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.v-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.v-item:last-child { border-bottom: none; padding-bottom: 0; }

.v-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.v-check {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
  cursor: pointer;
  flex-shrink: 0;
}

.v-name {
  font-size: 0.9rem;
  flex: 1;
}

.v-item.v-done .v-name {
  text-decoration: line-through;
  color: #aaa;
}

.v-seq {
  font-size: 0.82rem;
  color: #16a34a;
  font-weight: 700;
}

.v-item.v-done .v-seq { color: #aaa; }

.v-type {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.v-type.teiki { background: #dcfce7; color: #16a34a; }
.v-type.nini  { background: #fef3c7; color: #d97706; }

.v-note {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.2rem;
  margin-left: 1.65rem;
}

/* ━━━ 免責 ━━━ */
.disclaimer {
  font-size: 0.78rem;
  color: #999;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  line-height: 1.6;
}

/* ━━━ Amazon ━━━ */
.amazon-card h2 { margin-bottom: 0.25rem; }
.amazon-note { font-size: 0.82rem; color: #999; margin-bottom: 1rem; }
.amazon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.amazon-item {
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.amazon-item:hover {
  border-color: #FF9900;
  box-shadow: 0 2px 8px rgba(255,153,0,0.15);
  transform: translateY(-1px);
}
.amazon-item-icon { font-size: 1.7rem; margin-bottom: 0.35rem; }
.amazon-item-name { font-size: 0.88rem; font-weight: bold; margin-bottom: 0.2rem; }
.amazon-item-desc { font-size: 0.76rem; color: #888; line-height: 1.5; margin-bottom: 0.45rem; }
.amazon-item-link { font-size: 0.78rem; color: #FF9900; font-weight: bold; }

/* ━━━ Tips ━━━ */
.tips-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tip-item { display: flex; gap: .65rem; }
.tip-icon { font-size: 1.4rem; flex-shrink: 0; }
.tip-text strong { display: block; font-weight: 700; margin-bottom: .15rem; font-size: .88rem; }
.tip-text p { font-size: .8rem; color: #78716c; line-height: 1.55; }

/* ━━━ 活用シーン ━━━ */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}
.scene-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
}
.scene-icon { font-size: 1.7rem; flex-shrink: 0; }
.scene-body strong { display: block; font-size: .88rem; font-weight: 700; color: #14532d; margin-bottom: .2rem; }
.scene-body p { font-size: .78rem; color: #4b5563; line-height: 1.55; margin: 0; }

/* ━━━ FAQ ━━━ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { padding: .9rem 0; border-bottom: 1px solid #f0f0f0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q { font-size: .9rem; font-weight: 700; color: #16a34a; margin-bottom: .35rem; }
.faq-a { font-size: .85rem; color: #555; line-height: 1.75; }

/* ━━━ 関連ツール ━━━ */
.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.related-tool-item {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem 1rem;
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.related-tool-item:hover { border-color: #16a34a; box-shadow: 0 2px 8px rgba(22,163,74,.1); }
.related-tool-icon { font-size: 1.6rem; flex-shrink: 0; }
.related-tool-item strong { display: block; font-size: .88rem; font-weight: 700; color: #16a34a; margin-bottom: .2rem; }
.related-tool-item p { font-size: .76rem; color: #888; line-height: 1.5; margin: 0; }

/* ━━━ footer ━━━ */

.amazon-notice {
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 0.2rem;
}

/* ━━━ レスポンシブ ━━━ */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: .82rem;
  color: #a8a29e;
  border-top: 1px solid #e7e5e4;
  margin-top: auto;
}
footer a { color: #ea580c; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p + p { margin-top: .3rem; }

@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  .input-row { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }
  .amazon-grid { grid-template-columns: 1fr; }
}

/* ━━━ 印刷スタイル ━━━ */
@media print {
  header, footer, .hero-badges, .btn, .btn-sm,
  .action-row, .amazon-card, .tips-grid,
  .scene-grid, .faq-list, .related-tools,
  .description, h1, .hero-icon { display: none !important; }

  body { background: #fff; }
  main { max-width: 100%; margin: 0; padding: 0; }

  .progress-card, .ms-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    break-inside: avoid;
    margin-bottom: 0.5rem;
  }

  .ms-card { border-left: 3px solid #333 !important; }
  .ms-card.ms-done { border-left-color: #16a34a !important; }

  .v-check { display: none; }
  .v-item.v-done .v-name { text-decoration: line-through; }
}
