:root {
  --paper: #FAFAF7;
  --ink: #141A24;
  --line: #CCD3DD;
  --pcb: #0142A8;
  --pcb-dark: #01307C;
  --copper: #E06800;
  --orange: #FF7701;
  --blue-tint: #E8EEF8;
  --muted: #5A6270;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "Meiryo", sans-serif;
  line-height: 1.75;
  font-size: 16px;
  font-feature-settings: "palt";
}

a {
  color: var(--pcb-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--pcb);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pcb);
  outline-offset: 2px;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1060px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand img {
  height: 40px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

main {
  min-height: 60vh;
}

section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

section:first-of-type {
  border-top: none;
}

h1,
h2,
h3 {
  word-break: auto-phrase;
  text-wrap: balance;
}

h2 {
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.sec-en {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.kv {
  position: relative;
  padding: 0;
  border-top: none;
  overflow: hidden;
  background: #6F93C2;
}

.kv img {
  display: block;
  width: 100%;
  height: clamp(360px, 52vw, 620px);
  object-fit: cover;
  object-position: center 45%;
}

.kv-text {
  position: absolute;
  inset: 0;
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) 20px 0;
  color: #fff;
}

.kv-text::before {
  content: "";
  position: absolute;
  inset: 0 -100vw;
  background: linear-gradient(
    180deg,
    rgba(18, 40, 72, 0.48) 0%,
    rgba(18, 40, 72, 0.28) 50%,
    rgba(18, 40, 72, 0) 78%
  );
  z-index: -1;
}

.kv-org {
  font-size: clamp(0.82rem, 1.4vw, 0.95rem);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.kv h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  margin: 0;
}

.kv h1 span {
  display: block;
  font-size: 0.36em;
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .kv img {
    height: min(74vh, 560px);
  }

  .kv-text {
    padding-top: 44px;
  }
}

.intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.intro-text p + p {
  margin-top: 12px;
}

.intro-text p {
  font-size: 1rem;
}

.section-block {
  border: 1px solid var(--line);
  background: #fff;
  padding: 24px 26px;
  margin-bottom: 24px;
}

.section-block h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  margin-top: 0;
}

.section-block p {
  font-size: 0.92rem;
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  section.wrap {
    padding: 40px 20px;
  }
}

/* Event list styles */
#event-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

.event-card {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 20px;
  transition: box-shadow 0.3s ease;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(1, 42, 168, 0.1);
}

.event-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 0;
}

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  text-align: center;
  letter-spacing: 0.05em;
  min-width: 60px;
}

.event-past .status-badge {
  background: var(--muted);
}

.event-ongoing .status-badge {
  background: #E84C3D;
  animation: pulse 2s ease-in-out infinite;
}

.event-upcoming .status-badge {
  background: var(--pcb);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.event-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.event-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.event-title a {
  color: var(--ink);
  text-decoration: none;
}

.event-title a:hover {
  color: var(--pcb);
}

.event-title-eng {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}

.event-date {
  margin: 0;
  font-size: 0.9rem;
  color: var(--copper);
  font-weight: 600;
}

.event-organization {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.event-description {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--ink);
  flex-grow: 1;
}

.event-link {
  margin-top: 8px;
  display: inline-block;
  color: var(--pcb);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.event-link:hover {
  color: var(--pcb-dark);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .event-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .event-status {
    justify-content: flex-start;
  }

  .event-title {
    font-size: 1rem;
  }
}

/* Prolog and Epilog sections */
.prolog,
.epilog {
  border: 1px solid var(--line);
  background: var(--blue-tint);
  padding: 24px 26px;
  margin-bottom: 24px;
  border-radius: 2px;
}

.prolog h3,
.epilog h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  margin-top: 0;
  color: var(--ink);
}

.prolog p,
.epilog p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.prolog p + p,
.epilog p + p {
  margin-top: 10px;
}

footer {
  border-top: 3px solid var(--orange);
  padding: 34px 0 44px;
  margin-top: 56px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

footer a {
  color: var(--pcb-dark);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.cta {
  display: inline-block;
  background: var(--pcb);
  color: #fff;
  text-decoration: none;
  padding: 11px 26px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.cta:hover {
  background: var(--pcb-dark);
  color: #fff;
}

.nw {
  white-space: nowrap;
}

@media (max-width: 860px) {
  .hd {
    gap: 12px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand img {
    height: 32px;
  }
}
