/* ============================================
   KRICT 50th Anniversary — Responsive Styles
   ============================================ */

:root {
  --teal: #4cbbb4;
  --teal-dark: #3aa8a1;
  --teal-deep: #2f8f89;
  --navy: #0a3d5c;
  --navy-deep: #062a40;
  --ink: #1a1a1a;
  --muted: #5a6570;
  --line: #e2e6ea;
  --white: #ffffff;
  --header-h: 115px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --btn-font-size: 1.1rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  font-size: var(--btn-font-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 10px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn .arrow,
.link-more .arrow {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  background: url("../images/btn_arrow1.png") center / contain no-repeat;
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow,
.btn:focus-visible .arrow,
.link-more:hover .arrow {
  background-image: url("../images/btn_arrow2.png");
  transform: translateX(4px);
}

/* 솔리드(청록 배경) 버튼은 기본 화살표를 흰색으로 */
.btn-solid .arrow {
  background-image: url("../images/btn_arrow2.png");
}

.btn-solid:hover .arrow,
.btn-solid:focus-visible .arrow {
  background-image: url("../images/btn_arrow2.png");
}

.register .btn-solid:hover .arrow {
  background-image: url("../images/btn_arrow1.png");
}

.btn-light {
  background: var(--white);
  color: var(--teal);
}

.btn-light:hover {
  background: #f3fbfc;
}

.btn-solid {
  background: var(--teal);
  color: var(--white);
}

.btn-solid:hover {
  background: var(--teal-dark);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}

.btn-outline:hover {
  background: var(--teal);
  color: var(--white);
}

.btn-sm {
  min-height: 42px;
  padding: 0.55rem 1.15rem;
  font-size: var(--btn-font-size);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  color: var(--teal);
  font-weight: 600;
  font-size: var(--btn-font-size);
}

.text-regular {
  font-family: var(--font);
  font-weight: 400;
}

.text-semibold {
  font-family: var(--font);
  font-weight: 600;
}

.text-bold {
  font-family: var(--font);
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  color: var(--white);
  background: var(--teal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: calc(var(--max) + 280px);
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 102;
}

.logo-img {
  height: 64px;
  width: auto;
  max-width: min(352px, 29vw);
  object-fit: contain;
}

.logo-mark {
  width: 64px;
  height: 64px;
}

.footer-logo span {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-size: 1.29rem;
  font-weight: 500;
  letter-spacing: -1px;
  transition: font-weight 0.15s, text-decoration-color 0.15s;
}

.site-nav a:hover {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.btn-register {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 1.1rem;
  border: 2px solid var(--white);
  border-radius: 10px;
  background: var(--white);
  color: var(--teal) !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  letter-spacing: -1px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.btn-register:hover {
  background: var(--teal);
  color: var(--white) !important;
  border-color: var(--white);
  font-weight: 600 !important;
  text-decoration: none !important;
}

.nav-mobile-only {
  display: none !important;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 45px;
  height: 45px;
  z-index: 102;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin-left: auto;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-overlay {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 0;
  margin-top: var(--header-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.75rem;
  padding: 2.5rem 1.5rem 2.75rem;
  color: var(--white);
  background-color: var(--teal);
  background-image: url("../images/main-visual-bg.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-visuals {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  width: 80%;
  max-width: 1500px;
  margin: 0 auto;
}

.hero-visual {
  display: block;
  width: 50%;
  height: auto;
  object-fit: contain;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  justify-content: center;
  padding-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0;
  margin-bottom: 0;
}

.hero-actions .btn {
  font-size: var(--btn-font-size);
  min-height: 52px;
  padding: 0.85rem 1.6rem;
}

.hero-actions .btn-outline {
  background: var(--white);
}

.hero-actions .btn-outline:hover {
  background: var(--teal);
  color: var(--white);
}

/* ---------- Director Message ---------- */
.message {
  padding: 6rem 1.5rem;
  background: var(--white);
  font-size: 150%;
  letter-spacing: -1px;
}

/* Main page: portrait flush to section bottom */
.message:not(.invitation-page) {
  position: relative;
  overflow: hidden;
  padding: 5.5rem 1.5rem 0;
}

.message:not(.invitation-page) .message-inner {
  display: block;
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding-right: clamp(250px, 40%, 420px);
  padding-bottom: 5rem;
  min-height: 460px;
}

.message:not(.invitation-page) .message-text {
  position: relative;
  z-index: 1;
  max-width: 34em;
}

.message:not(.invitation-page) .message-text .btn {
  margin-top: 1.75rem;
}

.message:not(.invitation-page) .message-photo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(250px, 40%, 420px);
  max-width: none;
  margin: 0;
  line-height: 0;
}

.message:not(.invitation-page) .message-photo .photo-frame {
  overflow: visible;
  background: transparent;
}

.message:not(.invitation-page) .message-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: bottom right;
}

.invitation-page.message {
  padding-top: 4rem;
  font-size: 132%;
}

.invitation-page .page-heading {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
  font-size: 1rem; /* reset .message 150% inheritance */
  letter-spacing: normal;
}

.invitation-page .message-inner {
  display: grid;
  grid-template-columns: minmax(0, 35fr) minmax(0, 65fr);
  gap: 2.5rem 3rem;
  align-items: stretch;
  max-width: 920px;
}

.invitation-page .invitation-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  min-width: 0;
}

.invitation-page .invitation-aside img {
  width: 100%;
  height: auto;
  display: block;
}

.invitation-page .message-text {
  overflow: visible;
  min-width: 0;
}

.invitation-page .message-text b {
  color: var(--ink);
  font-weight: 700;
}

.invitation-page .invitation-sign {
  display: inline-block;
  margin-top: 1.5rem !important;
}

.message-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 2.5rem 2.75rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
}

.message-text h2 {
  color: var(--teal);
  font-size: clamp(1.65em, 2.8vw, 2.15em);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -1px;
  margin-bottom: 1.75rem;
}

.message-text p {
  color: var(--muted);
  font-size: 0.88em;
  line-height: 1.85;
  max-width: none;
}

.message-text p + p {
  margin-top: 1.1rem;
}

.message-photo {
  position: relative;
  width: 100%;
}

.photo-frame {
  overflow: hidden;
  background: transparent;
}

.photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.message-photo figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1rem;
  font-size: 0.9em;
  color: var(--muted);
}

.message-photo figcaption strong {
  color: var(--ink);
  font-size: 1em;
}

.message .link-more {
  font-size: var(--btn-font-size);
  letter-spacing: -1px;
  font-weight: 600;
}

/* ---------- Program ---------- */
.program {
  padding: 5.5rem 1.5rem 6rem;
  background: #f7fafb;
  font-size: 150%;
  letter-spacing: -1px;
}

.program-inner {
  max-width: 960px;
  margin: 0 auto;
}

.program-header {
  text-align: center;
  margin-bottom: 3rem;
}

.program-header h2 {
  font-size: clamp(1.55em, 2.5vw, 2em);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--teal);
}

.program-info {
  display: flex;
  justify-content: center;
  margin-top: 0.85rem;
  font-size: 0.95em;
  line-height: 1.8;
}

.program-info-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
  text-align: left;
}

.program-info .info-label {
  font-family: var(--font);
  font-weight: 700;
  color: #4cbbb4;
}

.program-info .info-value {
  font-weight: 400;
  color: #000000;
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.program .btn {
  font-size: var(--btn-font-size);
}

.schedule-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 0;
  border-top: 2px solid #4cbbb4;
  border-bottom: 2px solid #4cbbb4;
  table-layout: fixed;
}

.schedule thead th {
  padding: 1.15rem 1.25rem 0.85rem;
  font-size: 0.95em;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  border: 0;
  border-bottom: 1px solid #dfdfdf;
  vertical-align: bottom;
}

.schedule tbody td {
  padding: 1.25rem 1.25rem;
  border: 0;
  border-bottom: 1px solid #dfdfdf;
  vertical-align: middle;
}

.schedule tbody tr:last-child td {
  border-bottom: 0;
}

.schedule th:nth-child(1),
.schedule td:nth-child(1) {
  width: 30%;
  text-align: center;
}

.schedule th:nth-child(2),
.schedule td:nth-child(2) {
  width: 24%;
  background: #eaf6f6;
  text-align: center;
}

.schedule th:nth-child(3),
.schedule td:nth-child(3) {
  width: 46%;
}

.schedule thead th:nth-child(1) {
  font-weight: 600;
}

.schedule-time {
  font-family: var(--font);
  font-size: 0.88em;
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.schedule-cat {
  font-size: 0.94em;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -1px;
}

.schedule-desc {
  font-size: 0.85em;
  color: var(--ink);
}

/* ---------- Video ---------- */
.video-section {
  padding: 5.5rem 1.5rem;
  background: var(--white);
  font-size: 150%;
  letter-spacing: -1px;
}

.video-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.video-header h2 {
  font-size: clamp(1.4em, 2.2vw, 1.85em);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--teal);
}

.video-section .btn {
  font-size: var(--btn-font-size);
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a3d5c;
}

.video-embed {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-embed-iframe {
  position: absolute;
  inset: 0;
  border: 0;
  object-fit: unset;
}

.video-play-btn {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.video-play-btn img {
  width: clamp(64px, 12vw, 96px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s var(--ease);
}

.video-play-btn:hover img {
  transform: scale(1.06);
}

.video-player.is-playing .video-play-btn {
  display: none;
}

/* ---------- Register ---------- */
.register {
  padding: 5rem 1.5rem;
  text-align: center;
  color: var(--white);
  background: var(--teal);
  font-size: 150%;
  letter-spacing: -1px;
}

.register-inner {
  max-width: 640px;
  margin: 0 auto;
}

.register h2 {
  font-size: clamp(1.5em, 2.5vw, 1.9em);
  font-weight: 700;
  letter-spacing: -1px;
}

.register p {
  margin: 0.85rem 0 1.75rem;
  opacity: 0.9;
  font-size: 1.02em;
}

.register .btn {
  font-size: var(--btn-font-size);
}

.register .btn-solid {
  background: var(--white);
  color: var(--teal);
}

.register .btn-solid:hover {
  background: #f0fafb;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal);
  color: var(--white);
  padding: 2.25rem 1.5rem;
}

/* ---------- Sub pages ---------- */
.page-main {
  min-height: calc(100vh - var(--header-h) - 120px);
  min-height: calc(100dvh - var(--header-h) - 120px);
  margin-top: var(--header-h);
  background: var(--white);
}

.page-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  min-height: 50vh;
}

/* ============================================
   Sub-page heading
   ============================================ */

.page-heading {
  margin: 0 0 2.75rem;
}

.page-heading-title {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(1.85rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.25;
  margin: 0 0 0.95rem;
  color: #4cbbb4;
}

.page-heading-rules {
  border-top: 1px solid var(--teal);
}

.invitation-page {
  min-height: calc(100vh - var(--header-h) - 120px);
}

.invitation-page .message-text p {
  max-width: none;
}

.invitation-sign {
  margin-top: 2rem !important;
  color: var(--ink) !important;
  font-size: 0.92em !important;
  line-height: 1.7;
}

.invitation-sign-img {
  display: inline-block;
  vertical-align: middle;
  width: auto;
  height: 1.8em;
  margin-left: 0.5em;
}

.invitation-page .btn {
  margin-top: 1.5rem;
}

.video-page .page-inner {
  max-width: 920px;
}

.video-gallery {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.video-gallery-title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.video-lab {
  margin-top: 0.5rem;
  margin-bottom: 4rem;
}

.video-lab-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.video-lab-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0.65rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #9aa3a8;
  color: #fff;
  font-family: var(--font);
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.video-lab-tab.is-active {
  background: #fff;
  color: var(--ink);
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.video-lab-tab:hover:not(.is-active) {
  background: #7f8990;
}

.video-lab-panel[hidden] {
  display: none;
}

/* ---------- Photos gallery ---------- */
.photos-page {
  background: #f7fafb;
}

/* ============================================
   History
   ============================================ */

.history-page {
  background: #f7fafb;
}

.history-inner {
  max-width: 920px;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.history-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.history-intro p {
  font-size: clamp(1.1rem, 1.8vw, 1.28rem);
  line-height: 1.7;
  color: var(--muted);
  letter-spacing: -0.5px;
}

.history-intro strong {
  color: var(--ink);
  font-weight: 700;
}

.history-sites {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.history-site {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
}

.history-site h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.5px;
  margin-bottom: 0.65rem;
}

.history-site ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-site li {
  position: relative;
  padding-left: 0.85rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.history-site li + li {
  margin-top: 0.3rem;
}

.history-site li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

.history-timeline {
  --axis: 9.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.history-timeline::before {
  content: "";
  position: absolute;
  left: var(--axis);
  top: 0.55rem;
  bottom: 0.55rem;
  width: 2px;
  background: #d7e6e5;
  transform: translateX(-50%);
}

.history-era {
  display: grid;
  grid-template-columns: var(--axis) minmax(0, 1fr);
  column-gap: 1.75rem;
  position: relative;
  padding-bottom: 2.25rem;
}

.history-era:last-child {
  padding-bottom: 0;
}

.history-era-year {
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  text-align: right;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -1px;
  line-height: 1.35;
  padding: 0.1rem 1.35rem 0 0;
  position: relative;
}

.history-era-year::after {
  content: "";
  position: absolute;
  top: 0.72em;
  right: 0;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid #f7fafb;
  box-sizing: border-box;
  transform: translateX(50%);
  z-index: 1;
}

.history-era-list {
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.history-era-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #eef3f3;
}

.history-era-list li:first-child {
  border-top: 0;
}

.history-era-list time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.history-era-list span {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.photos-inner {
  max-width: none;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.photo-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 2rem;
}

.photo-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 72px;
  padding: 0.65rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #9aa3a8;
  color: #fff;
  font-family: var(--font);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.photo-tab-period,
.photo-tab-label {
  font-size: clamp(0.82rem, 1.25vw, 1.05rem);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.photo-tab-period {
  font-weight: 700;
}

.photo-tab-label {
  font-weight: 500;
  opacity: 0.95;
}

.photo-tab.is-active {
  background: #fff;
  color: var(--ink);
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.photo-tab:hover:not(.is-active) {
  background: #7f8990;
}

.photo-era-title {
  text-align: center;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

.photo-slider {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.photo-slider:active {
  cursor: grabbing;
}

.photo-slider.is-dragging {
  cursor: grabbing;
}

.photo-nav {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  touch-action: manipulation;
  z-index: 2;
}

.photo-nav span {
  width: 0;
  height: 0;
  border-style: solid;
}

.photo-nav-prev span {
  border-width: 14px 20px 14px 0;
  border-color: transparent var(--teal) transparent transparent;
}

.photo-nav-next span {
  border-width: 14px 0 14px 20px;
  border-color: transparent transparent transparent var(--teal);
}

.photo-nav:hover span {
  opacity: 0.8;
}

.photo-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: 8px;
}

.photo-track {
  display: flex;
  width: 300%;
  transform: translate3d(-33.3333%, 0, 0);
  will-change: transform;
}

.photo-track.is-animating {
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.photo-slide {
  display: grid;
  grid-template-columns: 20% 80%;
  gap: 1.5rem;
  align-items: center;
  box-sizing: border-box;
  flex: 0 0 33.3333%;
  width: 33.3333%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
}

.photo-slide-heading {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 0.55rem;
}

.photo-slide-date {
  font-size: 0.98rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.photo-slide-line {
  border: 0;
  border-top: 2px solid var(--teal);
  margin: 0.85rem 0 1rem;
  width: 100%;
}

.photo-slide-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  letter-spacing: -0.5px;
}

.photo-slide-index {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
}

.photo-slide-media {
  overflow: hidden;
  border-radius: 4px;
  background: #e8eef0;
  aspect-ratio: 16 / 10;
}

.photo-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.footer-info {
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-info p + p {
  margin-top: 0.15rem;
}

.footer-privacy {
  margin-left: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.footer-privacy:hover {
  opacity: 0.85;
}

/* ---------- Forms / Apply / Check / Admin ---------- */
.form-page {
  background: #f7fafb;
}

.form-page .page-inner {
  max-width: 720px;
}

.form-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-hero h1 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.form-hero p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.form-hero .form-hero-actions {
  margin-top: 1.25rem;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2rem 1.75rem;
}

.form-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -1px;
  margin: 2rem 0 1rem;
}

.form-section-title:first-child {
  margin-top: 0;
}

.form-field {
  margin-bottom: 1.15rem;
}

.form-field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
  letter-spacing: -1px;
}

.form-field .req {
  color: #e04545;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="password"],
.form-field input[type="file"],
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  letter-spacing: -1px;
  transition: border-color 0.2s;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.form-field small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}

.form-radios {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.form-radios label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.form-radios input {
  accent-color: var(--teal);
  width: 18px;
  height: 18px;
}

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.form-consent {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  letter-spacing: -1px;
}

.form-result {
  margin-top: 1.25rem;
}

.form-page .btn,
.admin-page .btn {
  font-size: var(--btn-font-size);
}

.form-alert {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  letter-spacing: -1px;
}

.form-alert-success {
  background: #eaf6f6;
  color: var(--teal-deep);
  border: 1px solid #c5e8e6;
}

.form-alert-warning {
  background: #fff8e8;
  color: #8a6d1d;
  border: 1px solid #f0e0a8;
}

.form-alert-danger {
  background: #fdeeee;
  color: #b42318;
  border: 1px solid #f3c4c0;
}

.form-back {
  text-align: center;
  margin-top: 2rem;
}

.admin-page .page-inner {
  max-width: 1120px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-toolbar-left,
.admin-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.admin-toolbar label {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -1px;
}

.admin-toolbar select {
  min-height: 42px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--white);
}

.admin-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-danger {
  background: #dc3545;
  color: var(--white);
  border: 1.5px solid #dc3545;
}

.btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
  color: var(--white);
}

.admin-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid #dfdfdf;
  text-align: left;
  font-size: 0.9rem;
  letter-spacing: -1px;
  vertical-align: middle;
}

.admin-table th {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  border-bottom: 0;
}

.admin-table tr:nth-child(even) td {
  background: #f9fbfb;
}

.admin-table tr:hover td {
  background: #eaf6f6;
}

.admin-table .file-link {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.pagination-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.15rem;
}

.pagination-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--white);
  color: var(--teal);
  font-family: var(--font);
  font-size: 0.88rem;
  cursor: pointer;
}

.pagination-btn:hover,
.pagination-btn.active {
  background: var(--teal);
  color: var(--white);
}

.pagination-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.admin-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1400px) {
  .site-nav ul {
    gap: 1.25rem;
  }

  .site-nav a {
    font-size: 0.95rem;
  }

  .btn-register {
    font-size: 0.77rem !important;
    min-height: 38px;
    padding: 0 0.8rem;
  }

  .logo-img {
    height: 51px;
  }

  :root {
    --header-h: 96px;
  }
}

@media (max-width: 1100px) {
  :root {
    --header-h: 77px;
  }

  .nav-burger {
    display: flex;
  }

  .logo-img {
    height: 45px;
    max-width: min(224px, 48vw);
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 101;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
    background: var(--teal);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .site-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-nav a {
    display: block;
    padding: 1.1rem 0;
    font-size: 1.12rem;
  }

  .site-nav li:has(.btn-register) {
    border-bottom: 0;
  }

  .btn-register {
    margin-top: 1.25rem;
    justify-content: center;
    width: 100%;
    border: 2px solid var(--white);
    font-size: 1.15rem !important;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    min-height: 52px;
    padding: 0.75rem 1rem;
  }

  .btn-register:hover {
    border-width: 2px;
    border-style: solid;
    border-color: var(--white);
    text-decoration: none !important;
  }

  .nav-mobile-only {
    display: list-item !important;
    border-bottom: 0 !important;
  }

  .nav-mobile-only .btn-register,
  .btn-nav-apply {
    margin-top: 0.65rem;
    font-size: 1.15rem !important;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 20, 30, 0.45);
  }

  .nav-toggle:checked ~ .site-nav {
    transform: translateX(0);
  }

  .nav-toggle:checked ~ .nav-overlay {
    display: block;
  }

  .nav-toggle:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 960px) {
  .message:not(.invitation-page) {
    padding: 4rem 1.5rem;
  }

  .message:not(.invitation-page) .message-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .message:not(.invitation-page) .message-text {
    max-width: none;
    width: 100%;
    text-align: center;
    order: 1;
  }

  .message:not(.invitation-page) .message-text .btn {
    margin-inline: auto;
  }

  .message:not(.invitation-page) .message-photo {
    position: relative;
    right: auto;
    bottom: auto;
    order: 2;
    width: min(280px, 70%);
    max-width: 280px;
    margin: 2rem auto 0;
  }

  .message-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .message-photo {
    order: -1;
    max-width: 294px;
    margin: 0 auto;
    width: 100%;
  }

  .message-text {
    text-align: center;
  }

  .message-text p {
    margin-inline: auto;
  }

  .message-photo figcaption {
    align-items: center;
  }

  .invitation-page .message-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .invitation-page .invitation-aside {
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 1.25rem;
  }

  .invitation-page .invitation-aside img {
    width: calc(50% - 0.625rem);
    max-width: 200px;
  }

  .invitation-page .message-text {
    text-align: left;
    overflow: visible;
  }

  .invitation-page .invitation-sign {
    display: block;
    text-align: left;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 70px;
  }

  .logo-img {
    height: 38px;
  }

  .hero {
    min-height: 0;
    padding: 2rem 1rem 2.25rem;
    gap: 1.25rem;
  }

  .hero-visuals {
    flex-direction: column;
    align-items: center;
    width: 92%;
    max-width: 92%;
    gap: 0.75rem;
  }

  .hero-visual {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .message,
  .program,
  .video-section {
    padding: 4rem 1.25rem;
  }

  .message:not(.invitation-page) .message-text h2,
  .program-header h2 {
    font-size: clamp(1.35em, 5vw, 1.7em);
  }

  .program-header h2 .text-bold {
    display: block;
  }

  .schedule thead th {
    font-size: 0.78em;
  }

  .schedule-time {
    font-size: 0.72em;
  }

  .schedule-cat {
    font-size: 0.78em;
  }

  .schedule-desc {
    font-size: 0.72em;
  }

  .schedule th:nth-child(1),
  .schedule td:nth-child(1) {
    width: 25%;
  }

  .schedule th:nth-child(2),
  .schedule td:nth-child(2) {
    width: 26%;
  }

  .schedule th:nth-child(3),
  .schedule td:nth-child(3) {
    width: 49%;
  }

  .schedule thead th,
  .schedule tbody td {
    padding: 1rem 0.85rem;
  }

  .schedule-time {
    white-space: normal;
  }

  .video-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-info {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 1rem;
  }

  .logo-img {
    height: 32px;
  }

  .program-actions {
    flex-direction: column;
  }

  .program-actions .btn {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .history-sites {
    grid-template-columns: 1fr;
  }

  .history-timeline {
    --axis: 7.75rem;
  }

  .history-era {
    column-gap: 1.35rem;
  }

  .history-era-year {
    padding-right: 1.2rem;
    font-size: 1.12rem;
  }

  .video-lab-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-slide {
    grid-template-columns: 1fr;
  }

  .photo-slide-media {
    order: -1;
  }
}

@media (max-width: 768px) {
  .history-timeline {
    --axis: 0.75rem;
    padding-left: 0;
  }

  .history-timeline::before {
    top: 0.4rem;
    bottom: 0.4rem;
  }

  .history-era {
    grid-template-columns: 1fr;
    padding-left: 1.85rem;
    column-gap: 0;
    gap: 0.75rem;
  }

  .history-era-year {
    text-align: left;
    padding: 0.1rem 0 0;
  }

  .history-era-year::after {
    right: auto;
    left: calc(var(--axis) - 1.85rem);
    top: 0.72em;
    margin-top: -6px;
    transform: translateX(-50%);
  }

  .history-era-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .video-lab-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photos-inner {
    width: 92%;
  }

  .photo-slider {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .photo-nav {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 40px;
    height: 40px;
  }

  .photo-nav-prev {
    left: 0.25rem;
  }

  .photo-nav-next {
    right: 0.25rem;
  }

  .photo-slide {
    padding: 1.1rem;
  }
}

@media (max-width: 480px) {
  .photo-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .photo-tab {
    min-height: 64px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
