/* ===== Base ===== */
body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px;
  line-height: 1.7;
  background: #f5f7fb;
  color: #1f2937;
}

/* ===== Typography ===== */
h1 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #0f172a;
  line-height: 1.4;
}

h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 24px;
  border-left: 4px solid #2563eb;
  padding-left: 10px;
  color: #0f172a;
  line-height: 1.5;
}

h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 18px;
  color: #1e293b;
}

p {
  margin: 0 0 16px;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

/* ===== Navigation ===== */
nav {
  margin: 10px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

nav a {
  margin-right: 16px;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

/* ===== Card ===== */
.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  margin-top: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.card-important {
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 14px;
  padding: 22px;
  margin-top: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

/* ===== Grid (Home用) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* ===== Hero (ホーム用) ===== */
.hero {
  background: linear-gradient(135deg, #ffffff, #eef4ff);
  border-radius: 18px;
  padding: 40px 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 28px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 20px;
  color: #475569;
}

/* ===== Highlight / CTA ===== */
.highlight-box {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #2563eb;
  padding: 18px;
  border-radius: 12px;
  margin-top: 20px;
  text-align: center;
}

.highlight-box a {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.highlight-box a:hover {
  text-decoration: underline;
}

/* ===== Buttons ===== */
.button-primary {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
}

.button-primary:hover {
  background: #1d4ed8;
  text-decoration: none;
}

.button-secondary {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
}

.button-secondary:hover {
  background: #eff6ff;
  text-decoration: none;
}

/* ===== Form ===== */
label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
  background: #ffffff;
}

/* ===== Button (計算用) ===== */
button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background: #1d4ed8;
}

/* ===== Result ===== */
.result {
  margin-top: 20px;
  padding: 20px;
  background: #eef2ff;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
}

/* ===== Error ===== */
.error {
  color: #dc2626;
  font-weight: bold;
  margin-top: 12px;
}

/* ===== Note ===== */
.note {
  font-size: 14px;
  color: #6b7280;
  margin-top: 12px;
}

/* ===== Table ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #ffffff;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 10px;
  text-align: center;
}

th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

/* ===== Language Switch ===== */
.lang-switch {
  font-size: 14px;
  margin-bottom: 10px;
  color: #64748b;
}

/* ===== Links ===== */
a {
  color: #2563eb;
}

a:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
footer {
  margin-top: 40px;
  padding: 20px 0;
  font-size: 14px;
  color: #64748b;
  text-align: center;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  body {
    margin: 20px auto;
    padding: 0 14px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 17px;
  }

  .hero {
    padding: 28px 20px;
  }

  .hero p {
    font-size: 16px;
  }

  .card,
  .card-important {
    padding: 18px;
  }

  .button-primary,
  .button-secondary {
    display: block;
    text-align: center;
    margin-bottom: 10px;
  }

  th,
  td {
    padding: 8px;
    font-size: 14px;
  }

  .highlight-box a {
    font-size: 16px;
  }
}