/* ツールページ共通（TOOL 02 以降）。base.css の後に読み込む。クラス接頭辞は t- 。 */

.t-hero { padding: 56px 0 32px; }
.t-hero h1 { font-size: clamp(32px, 6vw, 48px); }
.t-hero .lead { max-width: 680px; margin-bottom: 0; }

.t-warning, .t-error {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 14px;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}
.t-caution {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; font-size: 14px;
  background: color-mix(in srgb, var(--yolk) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--yolk-deep) 40%, transparent);
}
.t-notice { margin: 14px 0 0; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.t-note { font-size: 14px; color: var(--muted); }
.t-note:last-child { margin-bottom: 0; }

.t-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-bottom: 32px;
}
.t-panel-title { font-size: 18px; margin: 0 0 14px; }
.t-panel.is-focus { border: 2px solid var(--yolk); box-shadow: var(--shadow); }

.t-stack { display: grid; gap: 16px; }
.t-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.t-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.t-actions.is-center { justify-content: center; }

.t-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t-field-grow { flex: 1 1 260px; }
.t-field > label, .t-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.t-hint { font-size: 12px; color: var(--muted); margin: 0; }

.t-input, .t-select, .t-textarea {
  width: 100%; min-width: 0; padding: 11px 16px; font-size: 16px; font-family: inherit; line-height: 1.6;
  border-radius: 12px; border: 2px solid var(--border); background: var(--bg); color: var(--text);
}
.t-input[type="date"] { color-scheme: light dark; }
.t-select { color-scheme: light dark; }
.t-textarea { resize: vertical; min-height: 96px; }
.t-input:focus-visible, .t-select:focus-visible, .t-textarea:focus-visible { outline: 3px solid var(--yolk-deep); outline-offset: 2px; }
.t-input[readonly] { background: var(--surface-2); }

.t-choice { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.t-choice legend { font-size: 13px; color: var(--muted); font-weight: 700; padding: 0; margin-bottom: 6px; }
.t-choice label {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 2px solid var(--border); background: var(--bg); font-weight: 700; font-size: 14px;
}
.t-choice input { accent-color: var(--yolk-deep); }
.t-choice label:has(input:checked) { border-color: var(--yolk-deep); background: color-mix(in srgb, var(--yolk) 18%, var(--surface)); }
.t-choice label:focus-within { outline: 3px solid var(--yolk-deep); outline-offset: 2px; }

/* 大きな数字のタイマー表示 */
.t-clock {
  font-size: clamp(56px, 16vw, 112px); font-weight: 800; line-height: 1; text-align: center;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em; margin: 8px 0 16px;
}
.t-clock-label { text-align: center; color: var(--muted); font-weight: 700; margin: 0; }
.t-progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0 0 20px; }
.t-progress span { display: block; height: 100%; width: var(--fill, 0%); background: var(--yolk); border-radius: inherit; transition: width 0.25s linear; }

/* 一覧 */
.t-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.t-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; display: grid; gap: 10px;
}
.t-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.t-item-title { font-size: 17px; font-weight: 700; margin: 0; word-break: break-word; }
.t-item-meta { font-size: 13px; color: var(--muted); margin: 0; word-break: break-word; }
.t-item-body { margin: 0; word-break: break-word; white-space: pre-wrap; }
.t-empty {
  text-align: center; color: var(--muted); padding: 32px 20px; margin: 0;
  border: 2px dashed var(--border); border-radius: var(--radius);
}

.t-badge {
  display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 10px; margin-right: 8px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; vertical-align: middle;
}
.t-badge.is-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.t-badge.is-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.t-badge.is-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.t-badge.is-muted { color: var(--muted); }

.t-summary { display: flex; gap: 24px; margin: 0; flex-wrap: wrap; }
.t-summary dt { font-size: 12px; color: var(--muted); }
.t-summary dd { margin: 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.t-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.t-section-head .t-panel-title { margin: 0; }
.t-block { margin-bottom: 40px; }

.t-details summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 8px 0; }

/* 次の行動へのリンク群 */
.t-next { display: flex; gap: 10px; flex-wrap: wrap; }

/* ページ下部の「ほかの道具」 */
.t-related { margin: 48px 0 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.t-related h2 { font-size: 18px; margin-bottom: 14px; }
.t-related ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.t-related a {
  display: block; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; font-weight: 700; font-size: 14px;
}
.t-related a:hover { border-color: var(--yolk); }
.t-related a:focus-visible { outline: 3px solid var(--yolk-deep); outline-offset: 2px; }
.t-related small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.t-related a[aria-current="page"] { border-color: var(--yolk); background: var(--surface-2); }

.t-sources { font-size: 13px; color: var(--muted); }
.t-sources ul { padding-left: 1.2em; margin: 6px 0 0; }

@media (max-width: 720px) {
  .t-hero { padding: 36px 0 24px; }
  .t-panel { padding: 18px; }
  .t-item { padding: 14px 16px; }
  .t-row > .btn { width: 100%; }
  .t-field { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .t-progress span { transition: none; }
}
