:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #1b2430;
  --muted: #5b6675;
  --border: #dfe4ec;
  --accent: #2f6df6;
  --accent-weak: #e8effe;
  --code-bg: #0f1729;
  --code-text: #e6edf6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151f;
    --panel: #1a212e;
    --text: #e7ecf3;
    --muted: #9aa6b6;
    --border: #2b3342;
    --accent: #6d9bff;
    --accent-weak: #1e2940;
    --code-bg: #0b1120;
    --code-text: #e6edf6;
  }
}

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

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  padding: 32px 16px 64px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
}

.site-nav {
  max-width: 720px;
  margin: 24px auto 0;
  font-size: 14px;

  a {
    color: var(--accent);
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

h1 {
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 8px;
}

.lead {
  color: var(--muted);
  margin-bottom: 32px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;

  label {
    font-weight: bold;
    font-size: 15px;
  }
}

input,
select,
button {
  font: inherit;
  color: inherit;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

/* ネイティブの矢印は右端に張り付くため、date/timeのピッカーアイコンと右位置を揃えた自前の矢印にする */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%23888888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: bold;

  &:hover {
    filter: brightness(1.05);
  }
}

.result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  align-items: baseline;

  dt {
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
  }

  dd {
    font-variant-numeric: tabular-nums;
    word-break: break-all;
  }
}

.result dd.mono,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.big {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent);
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 18px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

.cards {
  display: grid;
  gap: 16px;
  list-style: none;

  a {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px 22px;
    transition: border-color 0.15s;

    &:hover {
      border-color: var(--accent);
    }
  }

  h2 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--accent);
  }

  p {
    color: var(--muted);
    font-size: 15px;
  }
}
