:root {
  --form-blue: #2876a8;
  --form-blue-dark: #174f77;
  --form-blue-pale: #edf6fb;
  --form-ink: #2e3740;
  --form-line: #d6e1e8;
  --form-bg: #f5f7f8;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  color: var(--form-ink);
  background: var(--form-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

#container {
  width: min(calc(100% - 32px), 1080px);
  margin: 24px auto;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(28, 57, 77, .1);
}

header {
  height: auto;
  padding: 22px 24px;
  background: #fff;
}

#logo {
  width: auto;
  margin: 0;
  text-align: center;
}

#logo img {
  display: inline-block;
  width: min(440px, 88vw);
  height: auto;
}

#menubar {
  height: auto;
  overflow: visible;
  background: var(--form-blue);
}

#menubar ul {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}

#menubar li {
  float: none;
  width: auto;
  list-style: none;
}

#menubar li a {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-right: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}

#menubar li:first-child a {
  border-left: 1px solid rgba(255, 255, 255, .25);
}

#menubar li a:hover,
#menubar li.current a {
  border-bottom: 0 !important;
  color: #fff !important;
  background: var(--form-blue-dark);
  text-decoration: none !important;
}

#menubar li a:link,
#menubar li a:visited,
#menubar li a:focus,
#menubar li a:active {
  color: #fff !important;
  text-decoration: none !important;
}

#contents {
  width: auto;
  min-height: 440px;
  padding: 44px clamp(22px, 5vw, 64px) 64px;
}

#contents section {
  margin: 0;
}

#contents h2 {
  margin: 0 0 1.25em;
  padding: .55em .75em;
  border: 0;
  border-left: 7px solid var(--form-blue);
  border-radius: 0;
  color: var(--form-blue-dark);
  background: var(--form-blue-pale);
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.45;
}

#contents p {
  margin: 0 0 1.35em;
}

#contents a {
  color: var(--form-blue-dark);
  text-underline-offset: 3px;
}

form {
  margin: 0;
}

.ta1 {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  table-layout: fixed !important;
}

.ta1,
.ta1 th,
.ta1 td {
  border: 1px solid var(--form-line);
}

.ta1 th,
.ta1 td {
  padding: 14px 16px;
  vertical-align: middle;
}

.ta1 th {
  width: 31%;
  color: var(--form-ink);
  background: var(--form-blue-pale);
  font-weight: 700;
  text-align: left;
}

.ta1 th.tamidashi {
  width: auto;
  padding: 15px 18px;
  color: var(--form-blue-dark);
  background: #dfeff8;
  font-size: 18px;
  text-align: left;
}

.ta1 td.auto {
  background: #fff;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  max-width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #aebdc7;
  border-radius: 4px;
  color: var(--form-ink);
  background: #fff;
  font: inherit;
}

input.ws {
  width: min(100%, 520px);
}

select[name="item4"] {
  width: min(100%, 620px);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  vertical-align: -3px;
}

label {
  display: inline-block;
  padding: 3px 0;
}

.c {
  margin-top: 25px;
  text-align: center;
}

.btn,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  min-height: 46px;
  padding: 11px 24px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--form-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  background: var(--form-blue-dark);
}

input[type="reset"],
input[type="button"] {
  background: #667985;
}

footer {
  padding: 27px 20px;
  color: #eaf4fa;
  background: var(--form-blue-dark);
  text-align: center;
}

footer a {
  color: #fff;
}

footer small {
  font-size: 12px;
}

@media screen and (max-width: 800px) {
  body {
    background: #fff;
  }

  #container {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  header {
    padding: 18px;
  }

  #menubar ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #menubar li {
    display: block;
  }

  #menubar li a,
  #menubar li:first-child a {
    min-height: 48px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .2);
    border-bottom: 1px solid rgba(255, 255, 255, .2);
  }

  #menubar li:last-child {
    grid-column: 1 / -1;
  }

  #contents {
    padding: 30px 20px 48px;
  }

  .ta1,
  .ta1 tbody,
  .ta1 tr,
  .ta1 th,
  .ta1 td {
    display: block;
    width: 100%;
  }

  .ta1 tr {
    border: 1px solid var(--form-line);
    border-bottom: 0;
  }

  .ta1 th,
  .ta1 td {
    border: 0;
    border-bottom: 1px solid var(--form-line);
  }

  .ta1 th {
    padding: 10px 13px;
  }

  .ta1 td {
    padding: 13px;
  }

  .ta1 th.tamidashi {
    padding: 13px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    width: 100%;
    font-size: 16px;
  }

  input[name$="_year"] {
    width: 88px;
  }

  select[name$="_month"],
  select[name$="_day"] {
    width: 82px;
  }

  .c .btn {
    margin: 5px 3px;
  }
}
