/* ==========================================================================
   勤務時間・実働時間計算ツール
   PC: 左に入力カード(1枚) / 右に計算結果（sticky）
   SP: 入力 → 結果の1カラム
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  background: #f3f5f8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic Pro', 'Yu Gothic', 'Meiryo', sans-serif;
  color: #1f2937;
  line-height: 1.6;
}

button, input, select, textarea { font-family: inherit; }

:focus-visible {
  outline: 2px solid #2f6fb0;
  outline-offset: 2px;
}

/* ── パンくず・導入 ───────────────────────────────────────────── */
.wtc__breadcrumb,
.wtc__seo-header,
.wtc__main-container,
.wtc__doc-section {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.wtc__breadcrumb { margin-top: 14px; padding: 0 16px; }

.wtc__seo-header {
  margin-top: 10px;
  margin-bottom: 22px;
  padding: 0 16px;
}

.wtc__seo-header h1 {
  margin: 0 0 8px;
  font-size: 1.58rem;
  font-weight: 700;
  line-height: 1.4;
}

.wtc__seo-lead {
  margin: 0;
  max-width: 760px;
  color: #444;
  line-height: 1.75;
}

/* ── メインレイアウト ─────────────────────────────────────────── */
.wtc__main-container {
  margin-bottom: 48px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(320px, 55fr) minmax(280px, 45fr);
  gap: 20px;
  align-items: start;
}

.wtc__form-column {
  display: flex;
  flex-direction: column;
}

/* ── 入力カード（1枚に統合） ───────────────────────────────── */
.wtc__input-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  padding: 22px 22px 18px;
}

.wtc__block { padding: 4px 0; }

.wtc__block-title {
  margin: 0 0 14px;
  font-size: .95rem;
  font-weight: 700;
  color: #374151;
}

.wtc__divider {
  border: none;
  border-top: 1px solid #eef1f5;
  margin: 18px 0;
}

.wtc__time-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.wtc__time-arrow {
  padding-bottom: 12px;
  font-size: 1.2rem;
  color: #94a3b8;
  font-weight: 700;
}

.wtc__form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 150px;
}

.wtc__form-field--narrow { flex: 0 1 110px; }

.wtc__form-field label {
  font-size: .85rem;
  font-weight: 600;
  color: #4b5563;
}

.wtc__form-field input[type="time"],
.wtc__form-field input[type="number"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 1.1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
}

.wtc__form-field input:focus {
  border-color: #2f6fb0;
}

.wtc__hint {
  margin: 12px 0 0;
  font-size: .8rem;
  color: #6b7280;
}

/* ── 休憩リスト ───────────────────────────────────────────── */
.wtc__break-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.wtc__break-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wtc__break-row-label {
  flex: 0 0 auto;
  font-size: .9rem;
  font-weight: 600;
  color: #4b5563;
}

.wtc__break-row input[type="number"] {
  flex: 0 1 140px;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 1.1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
}

.wtc__break-row input:focus {
  border-color: #2f6fb0;
}

.wtc__break-row-unit {
  flex: 0 0 auto;
  font-size: .9rem;
  color: #6b7280;
}

.wtc__break-remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
  color: #9ca3af;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.wtc__break-remove:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.wtc__break-total {
  margin: -2px 0 12px;
  font-size: .82rem;
  color: #6b7280;
}

/* ── 詳細設定（所定労働時間） ─────────────────────────────── */
.wtc__advanced { margin: 4px 0 0; }

.wtc__advanced-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: .9rem;
  font-weight: 600;
  color: #2f6fb0;
  cursor: pointer;
  list-style: none;
}

.wtc__advanced-summary::-webkit-details-marker { display: none; }

.wtc__advanced-icon::before { content: "＋"; }
.wtc__advanced[open] .wtc__advanced-icon::before { content: "－"; }

.wtc__advanced-body {
  padding-top: 14px;
}

/* ── ボタン ───────────────────────────────────────────── */
.wtc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.wtc__btn-outline {
  background: #fff;
  border-color: #2f6fb0;
  color: #2f6fb0;
}

.wtc__btn-outline:hover { background: #eff6ff; }

.wtc__btn-text {
  background: none;
  border: none;
  padding: 6px 4px;
  font-size: .85rem;
  color: #9ca3af;
  text-decoration: underline;
  cursor: pointer;
}

.wtc__btn-text:hover { color: #6b7280; }

.wtc__reset-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ── 結果カード ───────────────────────────────────────────── */
.wtc__result-column {
  position: sticky;
  top: 20px;
}

.wtc__result-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  padding: 22px 22px 18px;
}

.wtc__result-title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
}

.wtc__notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: .88rem;
  line-height: 1.6;
}

.wtc__result-main {
  text-align: center;
  padding: 20px 12px;
  margin-bottom: 16px;
  background: #eff6ff;
  border-radius: 10px;
}

.wtc__result-main-label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 6px;
}

.wtc__result-main-value {
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.1;
}

.wtc__result-decimal-row {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.wtc__result-decimal-label {
  font-size: .85rem;
  font-weight: 600;
  color: #475569;
}

.wtc__result-decimal-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2563eb;
}

.wtc__result-decimal-hint {
  margin: 6px 0 0;
  font-size: .74rem;
  color: #94a3b8;
}

.wtc__result-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.wtc__result-sub {
  text-align: center;
  padding: 10px 6px;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 8px;
}

.wtc__result-sub-label {
  display: block;
  font-size: .76rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.wtc__result-sub-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
}

.wtc__result-sub-note {
  display: block;
  margin-top: 3px;
  font-size: .68rem;
  color: #9ca3af;
  line-height: 1.4;
}

.wtc__note-small {
  margin: -6px 0 14px;
  font-size: .74rem;
  color: #9ca3af;
}

.wtc__summary {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: .9rem;
  color: #374151;
  text-align: center;
}

.wtc__disclaimer {
  margin: 0;
  font-size: .72rem;
  line-height: 1.7;
  color: #b0b8c4;
}

/* ── 解説・FAQセクション ───────────────────────────────────── */
.wtc__doc-section {
  margin-top: 40px;
  margin-bottom: 60px;
  padding: 0 16px;
  color: #374151;
  line-height: 1.85;
}

.wtc__doc-section h2 {
  margin: 38px 0 14px;
  padding-left: 10px;
  border-left: 4px solid #1d4ed8;
  color: #111827;
  font-size: 1.22rem;
  font-weight: 700;
}

.wtc__doc-section h2:first-of-type { margin-top: 0; }

.wtc__doc-section h3 {
  margin: 0 0 6px;
  color: #1d4ed8;
  font-size: 1rem;
  font-weight: 700;
}

.wtc__doc-section p,
.wtc__doc-section li {
  color: #374151;
  font-size: .92rem;
  line-height: 1.85;
}

.wtc__doc-section p { margin: 0 0 12px; }

.wtc__doc-section a { color: #1d4ed8; font-weight: 600; }

/* 計算例カード */
.wtc__calc-example {
  max-width: 340px;
  margin: 0 0 16px;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.wtc__calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.wtc__calc-label {
  flex: 0 0 auto;
  min-width: 4.4em;
  font-size: .82rem;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
}

.wtc__calc-detail {
  flex: 1 1 auto;
  font-size: .85rem;
  color: #6b7280;
}

.wtc__calc-value {
  flex: 0 0 auto;
  font-size: .95rem;
  font-weight: 700;
  color: #374151;
  min-width: 3.4em;
  text-align: right;
}

.wtc__calc-divider {
  border: none;
  border-top: 1px dashed #cbd5e1;
  margin: 4px 0;
}

.wtc__calc-row--total .wtc__calc-label,
.wtc__calc-row--total .wtc__calc-value {
  color: #1d4ed8;
  font-size: 1.05rem;
}

.wtc__convert-table {
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: .86rem;
  width: auto;
}

.wtc__convert-table th,
.wtc__convert-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 14px;
  text-align: center;
}

.wtc__convert-table th {
  background: #f8fafc;
  color: #4b5563;
  font-weight: 600;
}

.wtc__faq-item {
  margin-bottom: 10px;
  padding: 13px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.wtc__faq-item p { margin: 0; }

.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-links li a {
  display: block;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
}

.related-links li a:hover { background: #eff6ff; }

/* ── レスポンシブ ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .wtc__main-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .wtc__form-column { order: 1; }
  .wtc__result-column {
    order: 2;
    position: static;
  }

  .wtc__result-main-value {
    font-size: 2.4rem;
  }
}

@media (max-width: 360px) {
  .wtc__time-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wtc__time-arrow {
    align-self: center;
    padding-bottom: 0;
    transform: rotate(90deg);
  }
}
