@import url(/css/colors.css);

:root {
  --header-height: 60px;
  --primary: #0017c1;
  --caution: #ec0000;
  --warning: #fb5b01;
}

body,
button {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  margin: 0;
}

.wrapper {
  margin: 0 auto;
  max-width: calc(100% - 16px);
  width: 1000px;
}

/* 共通コンポーネンツ */

.info-tag-container,
.button-container {
  align-items: center;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.info-tag,
.button {
  background: #fff;
  border: solid 2px black;
  display: block;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  padding: 10px;
  text-decoration: none;
  width: -moz-fit-content;
  width: fit-content;
}

.info-tag.primary {
  border: solid 2px var(--primary);
  color: var(--primary);
}

.info-tag.caution {
  border: solid 2px var(--caution);
  color: var(--caution);
}

.button.primary {
  background: var(--primary);
  border: solid 2px black;
  color: #fff;
}

.button.secondary {
  border: solid 2px var(--primary);
  color: var(--primary);
}

.alert {
  font-weight: bold;
  padding: 0.5rem 0 1rem 1rem;
}

.alert::before {
  font-weight: normal;
  display: block;
  margin-bottom: 1rem;
  padding: 0.25rem 1rem;
  width: -moz-fit-content;
  width: fit-content;
}

.alert.caution {
  border-left: solid 2px var(--caution);
}

.alert.caution::before {
  background: var(--caution);
  content: "重要";
  color: #fff;
}

.alert.warning {
  border-left: solid 2px var(--warning);
}

.alert.warning::before {
  background: var(--warning);
  content: "注意";
  color: #fff;
}

.alert.note {
  border-left: solid 2px var(--color-blue-600);
}

.alert.note::before {
  background: var(--color-blue-600);
  content: "情報";
  color: #fff;
}

.post-header {
  box-sizing: border-box;
  height: 250px;
  padding-top: 70px;
  position: relative;
}

.post-header::before {
  background: url(/images/hero-bg.webp);
  background-size: max(1300px, 100vw);
  background-position-x: center;
  content: "";
  height: 100%;
  overflow: hidden;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -1;
}

.post-header h1 {
  background: #fff;
  font-weight: bold;
  font-size: 2.25rem;
  padding: 0.5em 0;
  width: -moz-fit-content;
  width: fit-content;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 16px;
  line-height: 1.7;
  padding: 80px 0 160px;
}

.post h1 {
  font-size: 2.25rem;
  font-weight: bold;
  margin-top: 64px;
}

.post h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-top: 64px;
}

.post h3 {
  font-size: 1.75rem;
  font-weight: bold;
  margin-top: 24px;
}

.post h4 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 24px;
}

.post img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

.post table {
  width: -moz-fit-content;
  width: fit-content;
}

.post table th,
.post table td {
  border-top: solid 1px darkblue;
  border-bottom: solid 1px darkblue;
  padding: 5px;
  vertical-align: middle;
}

.post table th {
  font-weight: bold;
}

.post ul,
.post ol {
  padding-left: 40px;
}

.post ul {
  list-style: disc;
}

.post ol {
  list-style: decimal;
}

.post form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post .form-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post .form-section-label {
  font-weight: bold;
}

.post .form-section:has(:required) .form-section-label::after {
  content: "※必須";
  color: var(--caution);
  margin-left: 1em;
}

.post .form-section-support-label {
  color: #666;
  font-size: 0.75rem;
}

.post .form-section:has(:invalid) .invalid-message::before {
  content: attr(data-message);
  color: var(--caution);
}

.post label:has([type="radio"]),
.post label:has([type="check"]) {
  align-items: center;
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
}

.post input[type="radio"],
.post input[type="check"] {
  accent-color: var(--primary);
  display: block;
  height: 1.5rem;
  margin: 0;
  width: 1.5rem;
}

.post input[type="text"],
.post select {
  background: white;
  border: solid 2px #1a1a1a;
  box-sizing: border-box;
  border-radius: 0;
  color: #000;
  font-size: 1rem;
  height: 3.5rem;
  padding: 0.75rem 1rem;
  width: -moz-fit-content;
  width: fit-content;
}

.link-tile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  list-style: none !important;
  padding-left: 0 !important;
}

.link-tile a {
  border: solid 2px black;
  color: inherit;
  display: block;
  padding: 16px;
}
.link-tile li:nth-child(6n + 1) a {
  box-shadow: 6px 6px 0 0 var(--color-orange-300);
}
.link-tile li:nth-child(6n + 2) a {
  box-shadow: 6px 6px 0 0 var(--color-lime-500);
}
.link-tile li:nth-child(6n + 3) a {
  box-shadow: 6px 6px 0 0 var(--color-sky-400);
}
.link-tile li:nth-child(6n + 4) a {
  box-shadow: 6px 6px 0 0 var(--color-purple-300);
}
.link-tile li:nth-child(6n + 5) a {
  box-shadow: 6px 6px 0 0 var(--color-yellow-300);
}
.link-tile li:nth-child(6n) a {
  box-shadow: 6px 6px 0 0 var(--color-red-300);
}

.sns-link img {
  display: block;
  width: 1.75rem;
}

.icon img,
img.icon {
  display: block;
  width: 1.75rem;
}

@media screen and (max-width: 767px) {
  .post h1 {
    font-size: 2rem;
  }

  .post h2 {
    font-size: 1.75rem;
  }

  .post h3 {
    font-size: 1.5rem;
  }

  .post h4 {
    font-size: 1.25rem;
  }
}

/* ヘッダー */

#hamburger-status {
  position: absolute;
  top: -100px;
  left: -100px;
}

.header {
  display: flex;
  justify-content: space-between;
  line-height: var(--header-height);
}

.header .logo {
  font-weight: bold;
}

.header a {
  color: inherit;
  display: block;
  text-decoration: none;
}

.header nav ul {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.header nav ul {
  display: flex;
  align-items: center;
}

.header .mobile-only {
  display: none;
}

@media screen and (max-width: 767px) {
  body:has(#hamburger-status:checked) {
    height: 100vh;
    overflow: hidden;
  }
  .header:has(#hamburger-status:checked) nav {
    background: white;
    min-height: 100vh;
    max-height: 100vh;
    left: 0;
    line-height: 1.7;
    overflow: auto;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100000;
  }
  .header:has(#hamburger-status:checked) nav ul {
    align-items: normal;
    flex-direction: column;
    text-align: center;
    padding: 40px 0 80px;
  }
  .header:has(#hamburger-status:checked) nav .button,
  .header:has(#hamburger-status:checked) nav .sns-link img {
    margin: 0 auto;
  }
  .header:has(#hamburger-status:not(:checked)) nav {
    display: none;
  }
  .header div.hamburger-open-button {
    display: flex;
    align-items: center;
  }
  .header .mobile-only {
    display: block;
  }
}

/* フッター */
.footer {
  background-color: var(--color-gray-100);
  padding: 32px 0 64px;
}

.footer > footer {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer a.kunifes-logo-container {
  align-items: center;
  display: flex;
  width: -moz-fit-content;
  width: fit-content;
}

.footer nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer nav a {
  color: inherit;
  font-size: 0.85rem;
}

.footer .kunifes-logo-container {
  color: inherit;
  text-decoration: none;
}
.footer .kunifes-logo {
  height: 2.5rem;
}
.footer .kunifes-text {
  border-left: solid 2px black;
  line-height: 1.7;
  margin-left: 1rem;
  padding-left: 1rem;
}

.footer .engineer-team-logo {
  display: block;
  height: 1rem;
  margin-bottom: 1rem;
}

.footer small {
  color: #666;
  display: block;
  font-size: 0.8rem;
}

/* トップページ */

body.index-page {
  min-height: 100vh;
}

.hero-container {
  background: url(/images/hero-bg.webp);
  background-size: cover;
  background-position-x: center;
  background-position-y: min(45vh, 100vh - 35vw);
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  justify-content: center;
}

.hero-text-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  line-height: 1.2;
  margin: 0 auto 20vh;
  max-width: min(70%, 1000px);
  width: calc(100% - 16px);
  min-width: min(767px, 100% - 16px);
}

.hero-kunifess {
  font-size: 1.2rem;
  font-weight: bold;
}

img.hero-text {
  width: min(40vw, 600px);
  min-width: min(65vw, 450px);
}

.hero-date {
  font-weight: bold;
}

.hero-date span {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.hero-date img {
  max-height: 2.5rem;
  max-width: 50vw;
  margin-top: 0.5rem;
}

/* 結果発表 */

.result.passed {
  background: url(/images/result-decoration-sakura.png) #ffeaea;
  background-size: cover;
  border: solid 2px #e13754;
  padding: 20px 20px 40px;
  text-align: center;
}

.result.passed span {
  color: var(--color-orange-600);
  display: block;
  font-weight: bold;
  font-size: 3rem;
}

.result.failed {
  background: var(--color-gray-50);
  border: solid 2px var(--color-gray-600);
  padding: 20px 20px 40px;
  text-align: center;
}

.result.failed span {
  color: var(--color-gray-600);
  display: block;
  font-weight: bold;
  font-size: 3rem;
}

.result-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.result-detail div {
  background-color: var(--result-background);
  background-image: var(--result-background-image);
  background-size: 100% 100%;
  background-position-x: right;
  background-repeat: no-repeat;
  border: solid 2px var(--result-accent-color);
  flex: 1;
  min-width: 200px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.result-detail dt {
  margin: 0 auto 1rem;
  width: -moz-fit-content;
  width: fit-content;
}

.result-detail div dt {
  background: var(--result-accent-color);
  border-radius: 100px;
  color: #fff;
  padding: 0 20px;
}

.result-detail div dd {
  font-weight: bold;
  font-size: 2.5rem;
}

.result-detail div span {
  color: var(--result-accent-color);
  display: block;
  font-weight: bold;
  font-size: 1rem;
}

.result-detail div.term {
  --result-accent-color: var(--color-orange-600);
  --result-background: var(--color-orange-50);
  --result-background-image: url(/images/result-decoration-orange.svg);
}

.result-detail div.geki.passed {
  --result-accent-color: var(--color-green-600);
  --result-background: var(--color-green-50);
  --result-background-image: url(/images/result-decoration-green.svg);
}

.result-detail div.geki.failed {
  --result-accent-color: var(--color-gray-600);
  --result-background: var(--color-gray-50);
}

.loading-icon-container {
  padding: 20px 0 !important;
  text-align: center;
}

.loading-icon {
  animation: 1.5s linear infinite loading-animation;
  border: solid 8px var(--primary);
  border-top: solid 8px lightgray;
  box-sizing: border-box;
  border-radius: 30px;
  margin: 0 auto;
  height: 60px;
  width: 60px;
}

@keyframes loading-animation {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 入場管理ページ */

#canvas {
  width: 100%;
  max-width: 500px;
}
