/* chobo.hakari-log.com 共通スタイル。
   hakari-log.com（入口ページ）と同じ色と組み方。カードを並べず、左の縦線と文章で見せる。 */
:root {
  --bg: #fdfdfc;
  --fg: #26262b;
  --muted: #6f6f78;
  --line: #dedeD8;
  --accent: #3f5b52;
  --soft: #f1f5f2;
  --input: #fff9e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --fg: #e4e4e2;
    --muted: #9a9aa2;
    --line: #32333a;
    --accent: #8fae9f;
    --soft: #1e2422;
    --input: #2a2820;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.95;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  width: min(100% - 2rem, 40rem);
  margin-inline: auto;
  padding: 2.5rem 0 5rem;
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.top a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.top a:hover {
  border-bottom-color: var(--accent);
}
.top .mark {
  width: 34px;
  height: auto;
  color: var(--accent);
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.5;
}
h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
}
h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}
p {
  margin: 0 0 1rem;
}
.lead {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.lead strong {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.1em;
}
.muted {
  color: var(--muted);
  font-size: 0.875rem;
}
a {
  color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

hr.rule {
  margin: 2.75rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* 一覧は「カード」でなく、左に線を引いた段落 */
.work {
  margin: 0 0 2.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line);
}
.work:hover {
  border-left-color: var(--accent);
}
.work h2 {
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
}
.work h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.work h2 a:hover {
  border-bottom-color: var(--accent);
}
.work .why {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.work .what {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

ul,
ol {
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}
li {
  margin-bottom: 0.3rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0 0 1.25rem;
}
th,
td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ダウンロードのボタン。主役なので少しだけ強く */
.dl {
  display: inline-block;
  margin: 0.25rem 0.5rem 0.75rem 0;
  padding: 0.6rem 1.1rem;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.dl.primary {
  background: var(--accent);
  color: #fff;
}
.dl:hover {
  filter: brightness(1.08);
}
.dl[disabled] {
  opacity: 0.45;
  cursor: default;
}

.note {
  padding: 0.9rem 1.1rem;
  background: var(--soft);
  border-radius: 6px;
  font-size: 0.875rem;
  margin: 0 0 1.25rem;
}
.note p:last-child {
  margin-bottom: 0;
}

/* 表の見本（Excelの画面を模した、文字だけの図） */
.sheet {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
.sheet table {
  width: auto;
  min-width: 100%;
  font-size: 0.8rem;
  border: 1px solid var(--line);
}
.sheet th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.sheet td {
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.sheet td.in {
  background: var(--input);
}
.sheet td.auto {
  color: var(--muted);
}

/* CSV 結合ツール */
.drop {
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 1.75rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  transition: border-color 0.15s;
}
.drop.over {
  border-color: var(--accent);
  color: var(--fg);
}
.drop input {
  display: none;
}
.opts {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}
.opts label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.opts select,
.opts input[type="text"] {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
}
.files {
  font-size: 0.85rem;
  margin: 0 0 1rem;
}
.files li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.3rem 0;
}
.files .meta {
  color: var(--muted);
  white-space: nowrap;
}
.files .warn {
  color: #b5502e;
}
.preview {
  overflow-x: auto;
  margin: 0 0 1rem;
}
.preview table {
  width: auto;
  min-width: 100%;
  font-size: 0.78rem;
}
.preview td,
.preview th {
  white-space: nowrap;
  border-right: 1px solid var(--line);
}
.status {
  font-size: 0.875rem;
  min-height: 1.5em;
  margin: 0 0 0.5rem;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}
footer a {
  color: inherit;
}
footer p {
  margin: 0 0 0.4rem;
}
