/* ↓ TOP PAGE ↓ */

:root {
  --light-blue: rgba(63, 198, 250, 1);
}

body {
  margin: 40px 0;
  align-items: center;
  font-family: "Noto Sans", sans-serif;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
a {
  margin: 0;
}

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

.ec__container {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 50px;
  gap: 60px;
}

.ec__section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: 100px;
}

.ec__section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
  margin-bottom: 40px;
}

.ec__section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  height: 7px;
  background-color: var(--light-blue);
  border-radius: 25px;
}

.ec__box-title {
  font-size: 24px;
  font-weight: 700;
  text-align: left;
  margin-bottom: 20px;
  padding-left: 20px;
  border-left: 5px solid var(--light-blue);
}

.ec__ranking-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ec__group-item {
  display: flex;
  flex-direction: column;
}

.ec__ranking-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
  gap: 10px;
  background-color: var(--light-blue);
  counter-reset: rank;
}

.ec__ranking-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: white;
  width: 100%;
  height: 65px;
  padding: 10px 15px;
  gap: 20px;
 counter-increment: rank;
}

.ec__ranking-item span {
  font-size: 36px;
  font-weight: 700;
}

.ec__ranking-item span::before {
  content: counter(rank);
  font-size: 36px;
  font-weight: 700;
}

/* ダミー文字を消す */
.ec__ranking-item span {
font-size: 0;
}

.ec__ranking-item span::after {
  content: "位";
  font-size: 18px;
}

.ec__ranking-item:first-child span {
  color: rgba(215, 7, 7, 1);
}

.ec__ranking-item:nth-child(2) span {
  color: rgba(255, 149, 0, 1);
}

.ec__ranking-item:nth-child(n+4) span {
  font-weight: normal;
}

.ec__ranking-item a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.ec__see-more {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 15px;
}

.ec__list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}

.ec__list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  height: 55px;
  width: 100%;
  font-weight: 700;
  text-decoration: none;
  background-color: var(--light-blue);
}

.ec__instruction-list {
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

.ec__instruction-list h1 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 20px;
}

.ec__instruction-list ul {
  margin: 0;
  list-style-type: decimal;
}
.ec__instruction-list ul li ul {
  list-style-type: disc;
}

.ec__instruction-img {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-evenly;
  margin-top: 20px;
}

.ec__instruction-img img {
  width: 360px;
  height: auto;
}

.ec__contact {
  display: flex;
  flex-direction: column;
  border: 5px solid var(--light-blue);
  border-radius: 15px;
}

.ec__contact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding-inline: 20px;
  background-color: var(--light-blue);
}

.ec__contact-top h1 {
  font-size: 28px;
}

.ec__contact-top span {
  font-size: 20px;
}

.ec__contact-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.ec__contact-tile-group {
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.ec__contact-tile-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  font-size: 36px;
  font-weight: 700;
  border-radius: 5px;
  background-color: rgba(40, 114, 142, 1);
  color: white;
}

.ec__contact-tile-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}

.red-strong {
  background-color: rgba(199, 59, 62, 1);
}

.red-mild {
  background-color: rgba(199, 59, 62, 0.75);
}

.ec__contact-body h2 {
  font-size: 20px;
  font-weight: 700;
}

.ec__contact-body a {
  padding: 15px 50px;
  color: white;
  border: none;
  text-decoration: none;
  border-radius: 50px;
  font-size: 32px;
  font-weight: 700;
  background-color: var(--light-blue);
}

@media (max-width: 768px) {
  body {
    margin: 20px 0;
  }

  .ec__container {
    gap: 40px;
  }

  .ec__section {
    padding-inline: 20px;
  }

  .ec__section-title {
    font-size: 24px;
    padding-bottom: 15px;
    margin-bottom: 30px;
  }

  .ec__section-title::after {
    width: 120px;
    height: 5px;
  }

  .ec__box-title {
    font-size: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--light-blue);
  }

  .ec__ranking-box {
    padding: 15px;
  }

  .ec__ranking-item {
    height: auto;
    min-height: 55px;
    padding: 10px;
    gap: 10px;
  }

  .ec__ranking-item span {
    font-size: 28px;
  }

  .ec__ranking-item span::after {
    font-size: 16px;
  }

  .ec__ranking-item a {
    font-size: 14px;
  }

  .ec__list-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .ec__list-item {
    height: 50px;
    font-size: 14px;
  }

  .ec__instruction-list {
    font-size: 14px;
  }

  .ec__instruction-list h1 {
    font-size: 16px;
  }

  .ec__instruction-img {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .ec__instruction-img img {
    width: 100%;
    max-width: 300px;
  }

  .ec__contact-top {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 10px;
    text-align: center;
  }

  .ec__contact-top h1 {
    font-size: 22px;
  }

  .ec__contact-top span {
    font-size: 16px;
  }

  .ec__contact-body {
    padding: 20px;
  }

  .ec__contact-tile-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    justify-items: center;
    width: 100%;
    gap: 5px;
  }

  .ec__contact-tile-item {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    font-size: 48px;
  }

  .ec__contact-tile-separator {
    display: none;
  }

  .ec__contact-tile-item:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .ec__contact-tile-item:nth-child(2) {
    grid-column: 2 / 3;
    grid-row: 1;
  }

  .ec__contact-tile-item:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .ec__contact-tile-item:nth-child(5) {
    grid-column: 2 / 3;
    grid-row: 2;
  }

  .ec__contact-tile-item:nth-child(7) {
    grid-column: 1 / 2;
    grid-row: 3;
  }

  .ec__contact-tile-item:nth-child(8) {
    grid-column: 2 / 3;
    grid-row: 3;
  }

  .ec__contact-tile-item:nth-child(9) {
    grid-column: 3 / 4;
    grid-row: 3;
  }

  .ec__contact-body h2 {
    font-size: 18px;
    text-align: center;
  }

  .ec__contact-body a {
    padding: 12px 40px;
    font-size: 24px;
  }
}

/* ↓ MAKER TOP PAGE ↓ */

/* Overrides "ec__list-grid" */
.override__list-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

/* Overrides "ec__list-item" */
.override__list-item {
  font-size: 28px;
  font-weight: 700;
}

.ec__table {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  gap: 10px;
}

.ec__table-link {
  align-self: flex-end;
}

.ec__table table {
  width: 100%;
  border-collapse: collapse;
}

.ec__table table th,
.ec__table table td {
  border: 2px solid rgba(204, 204, 204, 1);
  padding: 10px;
}

.ec__table table th {
  background-color: var(--light-blue);
  color: white;
}

.ec__table table th:nth-child(1),
.ec__table table td:nth-child(1) {
  width: 140px;
  text-align: center;
}

.ec__table table th:nth-child(2),
.ec__table table td:nth-child(2) {
  width: auto;
}

.ec__table table th:nth-child(3),
.ec__table table td:nth-child(3) {
  width: 140px;
  text-align: center;
}

.explanation h1 {
  font-size: 24px;
  font-weight: 700;
  padding-block: 5px;
  margin-bottom: 15px;
  text-align: center;
  color: white;
  background-color: var(--light-blue);
}

.explanation p {
  font-size: 18px;
}

.explanation p span {
  background: linear-gradient(
    to top,
    rgba(63, 198, 250, 0.5) 50%,
    transparent 50%
  );
  padding: 0 2px;
}

@media (max-width: 768px) {
  .override__list-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .override__list-item {
    font-size: 20px;
    height: 50px;
  }

  .ec__table {
    margin-top: 15px;
    gap: 10px;
    overflow-x: auto;
  }

  .ec__table-link {
    font-size: 14px;
  }

  .ec__table table {
    font-size: 14px;
  }

  .ec__table table th,
  .ec__table table td {
    padding: 8px;
  }

  .ec__table table th:nth-child(1),
  .ec__table table td:nth-child(1) {
    width: 80px;
  }

  .ec__table table th:nth-child(3),
  .ec__table table td:nth-child(3) {
    width: 80px;
  }

  .explanation h1 {
    font-size: 18px;
    padding-block: 8px;
    margin-bottom: 12px;
  }

  .explanation p {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* ↓ DETAILS PAGE ↓ */

.ec__two-column-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
}

.ec__two-column-table .column-item {
  padding: 15px;
  border: 2px solid rgba(217, 217, 217, 1);
  margin: -1px;
}

.ec__two-column-table .column-item:nth-child(odd) {
  background-color: rgba(238, 238, 238, 1);
  color: black;
  text-align: center;
  font-weight: 700;
}

.ec__two-column-table .column-item:nth-child(even) {
  background-color: white;
  color: black;
}

/* Mobile styles */
@media (max-width: 768px) {
  .ec__two-column-table {
    grid-template-columns: 1fr;
  }
}
