* {
  box-sizing: border-box;
}

html {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

body {
  margin: 0;

  background: #f5f7fb;
  color: #222;
}

/* ==============================
   ヘッダー
============================== */

.site-header {
  padding: 16px 20px;

  background: #ffffff;

  border-bottom: 1px solid #e5e7eb;
}

.site-logo {
  color: #2563eb;

  font-size: 20px;
  font-weight: 700;

  text-decoration: none;
}

.site-logo:hover {
  text-decoration: underline;
}

/* ==============================
   メイン
============================== */

.main-content {
  padding: 40px 16px 60px;
}

.tool-card {
  width: 100%;
  max-width: 760px;

  margin: 0 auto;

  padding: 32px;

  background: #ffffff;

  border-radius: 16px;

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* ==============================
   タイトル
============================== */

.tool-heading {
  margin-bottom: 30px;
}

.tool-heading h1 {
  margin: 0 0 12px;

  font-size: 28px;
  line-height: 1.4;
}

.tool-heading p {
  margin: 0;

  color: #666;

  font-size: 15px;
  line-height: 1.8;
}

/* ==============================
   入力
============================== */

.input-section,
.setting-section,
.option-section {
  margin-bottom: 24px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}

.section-title-row label,
.setting-label {
  font-weight: 700;
}

.member-count {
  color: #666;

  font-size: 14px;
}

/* ==============================
   テキスト入力
============================== */

.text-input {
  display: block;

  width: 100%;

  margin-top: 10px;

  padding: 12px 14px;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  outline: none;

  background: #ffffff;

  font: inherit;
  font-size: 16px;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.text-input:focus {
  border-color: #2563eb;

  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ==============================
   メンバー入力
============================== */

textarea {
  display: block;

  width: 100%;
  min-height: 210px;

  padding: 14px;

  resize: vertical;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  outline: none;

  font: inherit;
  font-size: 16px;
  line-height: 1.7;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

textarea:focus,
.date-input:focus {
  border-color: #2563eb;

  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ==============================
   期間
============================== */

.date-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 16px;
}

.date-input {
  display: block;

  width: 100%;

  margin-top: 10px;

  padding: 12px 14px;

  border: 1px solid #d1d5db;
  border-radius: 10px;

  outline: none;

  background: #ffffff;

  font: inherit;
  font-size: 16px;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

/* ==============================
   チェックボックス
============================== */

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;

  gap: 9px;

  cursor: pointer;
}

.checkbox-label input,
.radio-label input {
  width: 18px;
  height: 18px;

  margin: 0;

  accent-color: #2563eb;

  cursor: pointer;
}

.option-section {
  display: flex;
  flex-direction: column;

  gap: 12px;

  margin-bottom: 24px;
}

/* ==============================
   ラジオボタン
============================== */

.radio-group {
  display: flex;
  flex-direction: column;

  gap: 12px;

  margin-top: 12px;
}

/* ==============================
   メインボタン
============================== */

.primary-button {
  width: 100%;

  padding: 15px 20px;

  border: none;
  border-radius: 10px;

  background: #2563eb;
  color: #ffffff;

  font-size: 16px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s,
    transform 0.1s;
}

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

.primary-button:active {
  transform: scale(0.99);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.55;

  cursor: not-allowed;
}

/* ==============================
   エラー
============================== */

.error-message {
  margin: 14px 0 0;

  padding: 12px 14px;

  border-radius: 8px;

  background: #fef2f2;
  color: #dc2626;

  font-size: 14px;
}

/* ==============================
   結果
============================== */

.result-section {
  margin-top: 32px;

  padding-top: 28px;

  border-top: 1px solid #e5e7eb;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 16px;
}

.result-header h2 {
  margin: 0;

  font-size: 22px;

  word-break: break-word;
}

.result-header span {
  flex-shrink: 0;

  color: #666;

  font-size: 14px;
}

/* ==============================
   当番表
============================== */

.table-wrapper {
  width: 100%;

  overflow-x: auto;
}

.duty-table {
  width: 100%;

  border-collapse: collapse;

  background: #ffffff;

  font-size: 15px;
}

.duty-table th,
.duty-table td {
  padding: 13px 12px;

  border: 1px solid #e5e7eb;

  text-align: center;
}

.duty-table th {
  background: #f8fafc;

  font-weight: 700;
}

.duty-table td:last-child {
  font-weight: 700;
}

.duty-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* ==============================
   結果操作
============================== */

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 10px;

  margin-top: 20px;
}

.secondary-button,
.reset-button {
  padding: 12px 10px;

  border-radius: 8px;

  font: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s,
    border-color 0.2s;
}

.secondary-button {
  border: 1px solid #2563eb;

  background: #ffffff;
  color: #2563eb;
}

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

.reset-button {
  grid-column: 1 / -1;

  border: 1px solid #d1d5db;

  background: #ffffff;
  color: #555;
}

.reset-button:hover {
  background: #f3f4f6;
}

/* ==============================
   ファイル出力
============================== */

.export-group {
  display: grid;
  grid-template-columns: 150px 1fr;

  grid-column: 1 / -1;

  gap: 10px;
}

.export-select {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  outline: none;

  background: #ffffff;
  color: #222;

  font: inherit;
  font-size: 14px;

  cursor: pointer;

  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.export-select:focus {
  border-color: #2563eb;

  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.export-button {
  width: 100%;
}

/* ==============================
   コピー
============================== */

.copy-message {
  margin: 12px 0 0;

  text-align: center;

  color: #16a34a;

  font-size: 14px;
  font-weight: 700;
}

/* ==============================
   説明コンテンツ共通
============================== */

.tool-guide,
.tool-about,
.tool-uses,
.tool-faq {
  width: 100%;
  max-width: 760px;

  margin: 28px auto 0;

  padding: 28px 32px;

  background: #ffffff;

  border-radius: 16px;

  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

.tool-guide h2,
.tool-about h2,
.tool-uses h2,
.tool-faq h2 {
  margin: 0 0 20px;

  font-size: 22px;
  line-height: 1.5;
}

.tool-guide p,
.tool-about p,
.tool-uses p,
.tool-faq p {
  color: #555;

  font-size: 15px;
  line-height: 1.9;
}

/* ==============================
   使い方
============================== */

.tool-guide ol {
  margin: 0;

  padding-left: 24px;
}

.tool-guide li {
  margin-bottom: 12px;

  color: #444;

  font-size: 15px;
  line-height: 1.8;
}

.tool-guide li:last-child {
  margin-bottom: 0;
}

/* ==============================
   このツールについて
============================== */

.tool-about p {
  margin: 0 0 14px;
}

.tool-about p:last-child {
  margin-bottom: 0;
}

/* ==============================
   利用シーン
============================== */

.tool-uses ul {
  margin: 0;

  padding-left: 22px;
}

.tool-uses li {
  margin-bottom: 10px;

  color: #444;

  font-size: 15px;
  line-height: 1.8;
}

.tool-uses li:last-child {
  margin-bottom: 0;
}

/* ==============================
   FAQ
============================== */

.faq-item {
  padding: 20px 0;

  border-top: 1px solid #e5e7eb;
}

.faq-item:first-of-type {
  padding-top: 0;

  border-top: none;
}

.faq-item:last-child {
  padding-bottom: 0;
}

.faq-item h3 {
  margin: 0 0 10px;

  font-size: 16px;
  line-height: 1.6;
}

.faq-item p {
  margin: 0;

  color: #555;

  font-size: 15px;
  line-height: 1.8;
}

/* ==============================
   フッター
============================== */

.site-footer {
  padding: 32px 16px 36px;

  text-align: center;

  color: #777;

  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 10px 20px;

  margin-bottom: 16px;
}

.footer-links a {
  color: #555;

  font-size: 13px;

  text-decoration: none;
}

.footer-links a:hover {
  color: #2563eb;

  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

/* ==============================
   スマホ
============================== */

@media (max-width: 600px) {
  .main-content {
    padding: 24px 12px 40px;
  }

  .tool-card {
    padding: 24px 18px;

    border-radius: 12px;
  }

  .tool-heading h1 {
    font-size: 23px;
  }

  textarea {
    min-height: 190px;
  }

  .date-settings {
    grid-template-columns: 1fr;

    gap: 0;
  }

  .result-header {
    align-items: flex-start;
  }

  .duty-table {
    min-width: 520px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .export-group {
    grid-template-columns: 1fr;

    grid-column: auto;
  }

  .reset-button {
    grid-column: auto;
  }

  /* 説明コンテンツ */

  .tool-guide,
  .tool-about,
  .tool-uses,
  .tool-faq {
    margin-top: 20px;

    padding: 24px 18px;

    border-radius: 12px;
  }

  .tool-guide h2,
  .tool-about h2,
  .tool-uses h2,
  .tool-faq h2 {
    margin-bottom: 16px;

    font-size: 20px;
  }

  /* フッター */

  .footer-links {
    flex-direction: column;

    gap: 12px;
  }
}
