html,
body {
  overflow-x: hidden;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Helvetica", sans-serif;
  background-image: repeating-linear-gradient(-45deg,
      #faedff,
      #faedff 20px,
      #f6d3ff 20px,
      #f6d3ff 40px);

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.eventPageMain {
  flex: 1;
}

h2 {
  font-size: 2.5rem;
  color: #fffa67;
  background-color: rgb(140, 71, 160);
  text-align: center;
  padding: 1.5rem;
  margin: 0;
}

.centerTxt {
  font-size: 2rem;
  text-align: center;
  color: inherit;
}

.centerTxt2 {
  text-align: center;
  color: inherit;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #222;
  color: white;
  box-sizing: border-box;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link a {
  cursor: pointer;
  font-size: 16px;
  color: #ffffff;
  text-decoration: none;
}

.header-link a:hover {
  text-decoration: underline;
}

.logo-img {
  height: 60px;
  width: auto;
}

.top-section {
  text-align: center;
  padding: 1rem;
  position: relative;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.top-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0 2rem;
}

.eventPageTitle {
  width: 100%;
  text-align: center;
  padding: 1.5rem 0 0.8rem;
  background-color: #58147a86;
}

.eventPageTitle img {
  width: min(720px, 90%);
  height: auto;
  display: block;
  margin: auto;
}

.event-section {
  width: 85%;
  padding-top: 0.5rem;
  margin: 0 auto 2rem;
  text-align: center;
  border-radius: 10px;
  /* box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); */
  padding-bottom: 2rem;
  box-sizing: border-box;
  /* background-color: rgba(87, 44, 99, 0.66); */
  color: rgb(255, 255, 255);
}

.event-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding: 0 1rem;
  box-sizing: border-box;
}

.eventThumbWrap {
  position: relative;
  width: 100%;
}

.event-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1rem;
  padding: 0.75rem;
  text-align: center;
  width: 28%;
  max-width: 360px;
  min-width: 240px;
  text-decoration: none;
  color: #363636;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, transform 0.2s;
  box-sizing: border-box;
  box-shadow: 2px 2px 14px rgba(43, 0, 74, 0.687);
}

.event-card:hover {
  transform: translateY(-2px);
}

.event-card img {
  width: 100%;
  aspect-ratio: 450/550;
  object-fit: cover;
  border-radius: 0 0 8px 8px;
}

.event-card a {
  color: inherit;
  text-decoration: none;
}

.eventStatus {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
  color: #ffffff;
  border-radius: 8px 8px 0 0;
  letter-spacing: 0.05em;
}

.eventTitle {
  margin-top: 0.4rem;
  margin-bottom: 0rem;
  font-size: 1.15rem;
  font-weight: bold;
  line-height: 1.5;
  min-height: 1em;
}

.eventDate {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.eventBtn {
  width: 50%;
  margin-top: auto;
  color: #ffffff;
  background-color: #e34215;
  border-style: none;
  font-size: 1rem;
  padding: 0.6rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  margin: 0rem auto;
}

.eventBtn:hover {
  color: #e34215;
  background-color: #fff8ab;
  font-weight: bold;
}

.eventBtn:disabled {
  color: #ffffff;
  background-color: #999999;
  cursor: default;
  font-weight: normal;
}

/* イベント状態カラー */

.status-upcoming {
  background: linear-gradient(90deg, #2b7cff, #5aa3ff);
}

.status-active {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.status-ended {
  background: linear-gradient(90deg, #888, #666);
}

.status-published {
  background: linear-gradient(90deg, #7b2fa1, #9c4bd3);
}

.eventFilterWrap {
  width: 85%;
  margin: 1.2rem auto 0.5rem;
  box-sizing: border-box;
}

.eventFilterButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.eventFilterBtn {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  color: rgb(140, 71, 160);
  transition: 0.2s;
  box-shadow: 0px 0px 8px rgba(43, 0, 74, 0.687);
}

.eventFilterBtn:hover {
  opacity: 0.85;
}

.eventFilterBtn.is-active {
  background: linear-gradient(90deg, #7b2fa1, #9c4bd3);
  color: #ffffff;
}

@media (max-width: 768px) {
  .eventFilterWrap {
    width: 100%;
    padding: 0 0.8rem;
  }

  .eventFilterBtn {
    font-size: 0.9rem;
    padding: 0.55rem 0.95rem;
  }
}

.loading-message,
.no-event-message,
.error-message {
  text-align: center;
  font-size: 1rem;
  padding: 1.5rem 1rem 1.5rem;
  margin: 0;
  color: #ffffff;
  line-height: 1.8;
  background-color: #39154da9;
}

.agency-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
  text-align: center;
  width: 73%;
  margin: 3rem auto;
  margin-top: 120px;
  background-color: rgba(37, 37, 37, 0.453);
}

.agency-box {
  width: 80%;
  margin: 1rem auto;
}

.agency-box img {
  width: 400px;
  height: auto;
}

.agency-link {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  background: white;
  color: rgb(90, 26, 95);
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
}

#premium .profile-name {
  color: gold;
}

#premium .gallery-grid img {
  border: 2px solid gold;
}

.footer {
  background-color: #252525;
  color: white;
  padding: 16px 0;
  font-size: 14px;
  text-align: center;
}

.footer-text {
  max-width: 960px;
  margin: 0 auto;
  gap: 12px;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-credit a {
  color: inherit;
  text-decoration: none;
  margin: 0 8px;
}

@media (max-width: 768px) {
  .header {
    padding: 10px 12px;
    gap: 10px;
  }

  .header-right {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .header-left img {
    width: 100px;
    height: auto;
  }

  h2 {
    font-size: 1.4rem;
    padding: 1rem;
  }

  .top-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .top-text {
    text-align: center;
  }

  .sp-only {
    display: block;
  }

  .pc-only {
    display: none;
  }

  .event-section {
    text-align: center;
    margin: 0 auto 1.5rem;
    width: 100%;
    border-radius: 0;
  }

  .event-grid {
    gap: 0.8rem;
    margin-top: 1.2rem;
    padding: 0 0.5rem;
  }

  .event-card {
    margin: 0;
    padding: 0.5rem;
    width: calc(50% - 0.4rem);
    min-width: 0;
  }

  .eventTitle {
    font-size: 1rem;
    min-height: 3.2em;
  }

  .eventDate {
    font-size: 0.8rem;
  }

  .eventBtn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .agency-section {
    width: 90%;
  }

  .agency-box img {
    width: 80%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .event-card {
    margin: 0;
    padding: 0.5rem;
    width: calc(50% - 0.4rem);
    min-width: 0;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: flex-start;
  }
}