/* 表が主役の簡素な文書。カード・タイル・グラフ・Web フォント・飾りの色は使わない。色はリンクの青だけ (New / Updated の印も同じ青)。 */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --ink: #1a1a1a; --sub: #4d4d4d; --muted: #626264; --line: #949494; --link: #0017c1; --code: #f2f2f2;
  --text: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --mono: "Noto Sans Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
@supports (color: light-dark(#ffffff, #000000)) {
  :root {
    --bg: light-dark(#ffffff, #1a1a1a);
    --ink: light-dark(#1a1a1a, #f2f2f2);
    --sub: light-dark(#4d4d4d, #cccccc);
    --muted: light-dark(#626264, #b3b3b3);
    --line: light-dark(#949494, #767676);
    --link: light-dark(#0017c1, #9db7f9);
    --code: light-dark(#f2f2f2, #333333);
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1rem; line-height: 1.7; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.mono { font-family: var(--mono); }

.top { border-bottom: 1px solid var(--ink); }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.site { font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; }

.layout { display: flex; align-items: flex-start; max-width: 1280px; }
.side { flex: 0 0 248px; padding: 32px 24px; font-size: 0.875rem;
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
.side h2 { font-size: 0.875rem; font-weight: 700; margin: 0; padding: 6px 8px; }
.side ul { list-style: none; margin: 0 0 20px; padding: 0; }
.side li a { display: block; padding: 9px 8px 9px 24px; font-family: var(--mono); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.side li a:hover { text-decoration: underline; }
.side li a[aria-current="page"] { font-weight: 700; background: var(--code); }
main { flex: 1 1 0; min-width: 0; padding: 40px 24px 64px 32px; border-left: 1px solid var(--line); min-height: calc(100vh - 66px); }
.body { max-width: 800px; }

h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.4; margin: 0 0 24px; overflow-wrap: anywhere; text-wrap: balance; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.5; margin: 48px 0 16px; text-wrap: balance; }
h3 { font-size: 1rem; font-weight: 700; margin: 24px 0 8px; text-wrap: balance; }
p { margin: 0 0 12px; text-wrap: pretty; }
.small { font-size: 0.875rem; color: var(--sub); }
.updated { font-size: 0.875rem; color: var(--muted); margin: 48px 0 0; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 20px 24px 20px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--bg); font-size: 0.875rem; font-weight: 700;
  padding-block: 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
td.n, th.n { text-align: right; white-space: nowrap; font-size: 1.125rem; }
th.n { font-size: 0.875rem; }
td.up { font-weight: 700; }
td.act { white-space: nowrap; font-size: 0.875rem; padding-right: 0; }
td.act .copy { display: block; }
td.act .copy[hidden] { display: none; }
td.act .send { margin-top: 8px; gap: 4px 16px; }
td.act .send:first-child { margin-top: 0; }
.pick { display: none; width: 44px; padding-right: 0; }
.picking .pick { display: table-cell; }
.pick label { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -4px 0 0 -6px; cursor: pointer; }
.pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--link); cursor: pointer; }
.bundle[hidden] { display: none; }
.skill { font-family: var(--mono); font-size: 1.125rem; font-weight: 700; overflow-wrap: anywhere; }
.tag { margin-left: 8px; padding: 1px 8px; vertical-align: 2px; border: 1px solid var(--link); border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; line-height: 1.5; letter-spacing: 0.04em; white-space: nowrap; color: var(--link); }
.tag.new { color: var(--bg); background: var(--link); }
h1 .tag { margin-left: 12px; vertical-align: middle; }
td.date { white-space: nowrap; font-size: 0.875rem; color: var(--sub); }
.sub { display: block; font-size: 0.875rem; color: var(--sub); margin-top: 4px; max-width: 34em; text-wrap: pretty; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 20px; font-weight: 700; text-decoration: none;
  color: var(--link); border: 2px solid var(--link); border-radius: 8px; font-variant-numeric: tabular-nums; }
.btn:hover { text-decoration: underline; }

dl { margin: 0; border-top: 1px solid var(--line); }
dl div { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
dt { flex: 0 0 7em; font-size: 0.875rem; color: var(--sub); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.tool { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; min-height: 40px; padding: 6px 8px; }
.sort button { font: inherit; color: var(--ink); background: none; border: 0; border-bottom: 4px solid transparent; min-height: 48px; padding: 8px 16px; cursor: pointer; }
.sort button[aria-pressed="true"] { color: var(--link); font-weight: 700; border-bottom-color: var(--link); }
.sort[hidden] { display: none; }
.sort { display: flex; gap: 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cmd { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; background: var(--code); padding: 16px; margin-bottom: 12px; }
pre { font-family: var(--mono); font-size: 0.875rem; line-height: 1.8; margin: 0; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; align-self: center; }
.copy { font: inherit; font-size: 0.875rem; font-weight: 700; min-height: 44px; padding: 6px 16px; white-space: nowrap; cursor: pointer;
  color: var(--link); background: var(--bg); border: 1px solid var(--link); border-radius: 8px; }

.say { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.say li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.say span { min-width: 0; overflow-wrap: anywhere; }
.say .copy { min-height: 36px; padding: 2px 12px; }
details.more .say { border-top: 0; }
details.more summary { cursor: pointer; padding: 12px 0; color: var(--link); font-size: 0.875rem; }
.ask { display: block; font-size: 0.875rem; margin-top: 6px; max-width: 34em; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.ex { border-top: 1px solid var(--line); padding-top: 16px; }
.ex .q { font-weight: 700; }
.ex pre { background: var(--code); padding: 16px; }
td.req { overflow-wrap: anywhere; }

.voices { border-top: 1px solid var(--line); }
.voice { padding: 16px 0; border-bottom: 1px solid var(--line); }
.voice p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.send { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; }

@media (max-width: 760px) {
  .layout { flex-direction: column; align-items: stretch; }
  .side { order: 2; flex: none; border-top: 1px solid var(--line); padding: 24px 16px;
    position: static; max-height: none; overflow: visible; }
  main { flex: none; border-left: 0; padding: 32px 16px 48px; min-height: 0; }
  .bar { padding-inline: 16px; }
  h1 { font-size: 1.75rem; }
  /* 一覧は、Skill と数字を 1 段目、コピーと送り先を 2 段目に置く */
  .scroll table, .scroll thead, .scroll tbody { display: block; }
  .scroll tr { display: grid; grid-template-columns: 1fr 3.25rem 3.25rem; border-bottom: 1px solid var(--line); }
  .picking .scroll tr { grid-template-columns: 36px 1fr 3.25rem 3.25rem; }
  .scroll thead { position: sticky; top: 0; z-index: 1; background: var(--bg); }
  .scroll thead tr { border-bottom: 2px solid var(--ink); }
  .scroll th, .scroll td { border-bottom: 0; padding-right: 12px; }
  .scroll thead th { position: static; }
  td.n, th.n { font-size: 1rem; padding-right: 0; }
  th.n { font-size: 0.875rem; }
  td.date, th.date, th.act { display: none; }
  td.act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 0; }
  .picking td.act { grid-column: 2 / -1; }
  td.act .send { margin-top: 0; }
  th, td { padding-right: 12px; }
  .sub { max-width: 100%; }
}
