/* ポケットツールボックス 共通スタイル */
:root {
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-text: #1f2933;
  --color-muted: #5f6b7a;
  --color-border: #d9dee5;
  --color-accent: #2f6fde;
  --color-accent-dark: #2459b5;
  --color-error: #c0392b;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--color-accent);
}

/* ヘッダー */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px;
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.site-title a {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--color-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-accent);
}

/* 本文 */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.4;
}

h2 {
  margin: 32px 0 12px;
  font-size: 1.2rem;
  border-left: 4px solid var(--color-accent);
  padding-left: 10px;
}

h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.lead {
  margin: 0 0 20px;
  color: var(--color-muted);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 16px;
}

/* ツール一覧 */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.tool-list a {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--color-text);
  text-decoration: none;
}

.tool-list a:hover {
  border-color: var(--color-accent);
}

.tool-list .tool-name {
  display: block;
  font-weight: 700;
  color: var(--color-accent);
}

.tool-list .tool-desc {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* フォーム */
.field {
  margin-bottom: 16px;
}

.field > label,
.field > .field-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 0.95rem;
}

.field .hint {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

input[type="date"],
input[type="number"],
select {
  width: 100%;
  max-width: 280px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.inline-inputs {
  display: flex;
  gap: 8px;
}

.inline-inputs input {
  flex: 1;
  min-width: 0;
}

.inline-inputs select {
  width: auto;
}

.day-hours {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.day-hours label {
  display: block;
  text-align: center;
  font-size: 0.9rem;
}

.day-hours input {
  width: 100%;
  margin-top: 2px;
  text-align: center;
}

@media (min-width: 600px) {
  .day-hours {
    grid-template-columns: repeat(7, 1fr);
  }
}

.button {
  display: inline-block;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  background: var(--color-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.button:hover {
  background: var(--color-accent-dark);
}

.button.secondary {
  background: #fff;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.error {
  margin: 12px 0 0;
  color: var(--color-error);
  font-weight: 700;
}

/* 結果 */
.result {
  margin-top: 24px;
}

.summary {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
}

th,
td {
  border: 1px solid var(--color-border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef2f8;
  white-space: nowrap;
}

td:first-child {
  white-space: nowrap;
}

.copy-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.copy-message {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* よくある質問 */
.faq details {
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.faq details p {
  margin: 8px 0 0;
}

.note {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* フッター */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.site-footer .inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.footer-nav a {
  color: var(--color-muted);
}

.site-footer p {
  margin: 0;
}
