:root {
  color-scheme: light;
  --page: #fdfcf8;
  --navy: #0b305c;
  --muted: #577493;
  --border: #ccdbea;
  --card: #eff7fc;
  font-family: "Noto Sans JP", "Noto Sans", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--navy);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button:disabled { cursor: default; opacity: 1; }
:focus-visible { outline: 3px solid #376c9f; outline-offset: 4px; }

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 12px 4.4%;
  background: #fffefd;
  box-shadow: 0 2px 8px rgb(24 44 65 / 6%);
}
.brand { justify-self: start; font-size: 23.4px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.navigation { display: flex; }
.navigation-item {
  display: grid;
  place-items: center;
  width: 108px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: white;
  color: var(--navy);
  font-size: 15.6px;
  font-weight: 700;
  text-decoration: none;
}
.navigation-item + .navigation-item { border-left: 0; }
.navigation-item:first-child { border-radius: 7px 0 0 7px; }
.navigation-item:last-child { border-radius: 0 7px 7px 0; }
.navigation-item.is-current { background: var(--navy); color: white; border-color: var(--navy); border-radius: 7px; }
.settings { justify-self: end; display: grid; place-items: center; padding: 4px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--navy); }
.settings svg { width: 20px; height: 20px; }
.main { width: 90.6%; max-width: 936px; margin: 52px auto; }
h1 { margin: 0 0 20px; font-size: 41.6px; line-height: 1.4; font-weight: 700; letter-spacing: .02em; }

@media (max-width: 1100px) {
  .brand { font-size: 16.9px; }
  .navigation-item { width: 88px; font-size: 13px; height: 36px; }
  h1 { font-size: 29.9px; }
  .main { margin-top: 40px; }
}

/* iPhoneでは共通ナビゲーションを下部に固定する。 */
@media (max-width: 600px) {
  .header { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 5%; }
  .brand { font-size: 15.6px; }
  .settings { grid-column: 2; grid-row: 1; }
  .navigation { position: fixed; bottom: 0; left: 0; width: 100%; padding: 8px 5% calc(8px + env(safe-area-inset-bottom)); background: #fffefd; border-top: 1px solid var(--border); }
  .navigation-item { width: auto; flex: 1; min-height: 44px; }
  .main { margin: 24px auto; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  h1 { font-size: 22.1px; margin-bottom: 16px; }
}
