:root {
  --primary-color: #006036;
  --bg-light: #d0e8df;
  --text-main: #333;
  --text-sub: #666;
  --border-color: #ddd;
}

/* --- Base Reset & Typography --- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: url("files/background.png") fixed center / cover;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', 'Noto Sans JP', sans-serif, system-ui;
  line-height: 1.8;
  margin: 0;
  min-height: 100vh;
  padding-top: 9vw;
  -webkit-font-smoothing: antialiased;
}

p {
  font-size: 16px;
  margin: 16px 0;
}

ul {
  margin: 8px 0 16px;
  padding-left: 20px;
}

ul li {
  font-size: 16px;
}

p:has(+ ul),
.margin-fix-p {
  margin-bottom: 0 !important;
}

p + ul {
  margin-top: 0;
}

/* --- Header Navigation --- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1100px;
  padding: 1.2vw 1.8vw;
}

.brand-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.brand-link:hover {
  opacity: 0.7;
}

.brand-text {
  line-height: 1.2;
}

.brand-small {
  color: var(--text-sub);
  font-size: 1.27vw;
  margin: 0;
}

.brand-main {
  color: var(--primary-color);
  font-size: 2.0vw;
  font-weight: 700;
  margin: 0;
}

.brand-en {
  color: #333;
  font-size: 1.27vw;
  letter-spacing: 0.02em;
  margin: 0;
}

nav {
  align-items: center;
  display: flex;
  white-space: nowrap;
}

nav a {
  border-right: 1px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 1.45vw;
  font-weight: 700;
  line-height: 1;
  padding: 1.1vw 1.3vw;
  text-decoration: none;
  transition: background-color 0.2s;
}

nav a:first-child {
  border-left: 1px solid var(--primary-color);
}

nav a.active {
  background-color: var(--bg-light);
}

nav a:hover:not(.active) {
  background-color: #f0f7f4;
}

/* --- Main Layout & Card --- */
.container {
  flex: 1;
  margin: 18px auto;
  max-width: 1100px;
  width: 95%;
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 0 35px 28px;
}

.section-title {
  background: var(--bg-light);
  color: var(--primary-color);
  font-size: 22px;
  margin: 0 -35px 15px;
  padding: 4px 10px;
  text-align: center;
}

.bar-title {
  border-left: 5px solid var(--primary-color);
  font-size: 18px;
  font-weight: 700;
  margin: 25px 0 8px;
  padding-left: 10px;
}

.bar-title.section-item {
  margin-top: 0;
}

.section-hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 30px 0 25px;
}

/* --- Shared UI Components --- */
.pdf-link {
  color: #1f5fa8;
  font-weight: 700;
  text-decoration: none;
}

.pdf-link:hover {
  text-decoration: underline;
}

.gray-box {
  background-color: #f9f9f9;
  border: 1px solid var(--border-color);
  padding: 15px 25px 8px;
  border-radius: 8px;
  margin: 16px 0 25px;
}

.gray-box.inline {
  display: table;
  width: auto;
}

.gray-box.contact-box {
  padding: 20px 25px;
  margin-top: 15px;
}

.email-row {
  display: flex;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}

.email-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 17px;
}

.email-note {
  font-size: 14px;
  color: var(--text-sub);
}

.important-box {
  display: inline-block;
  min-width: 320px;
  background-color: #f9f9f9;
  border: 1px solid var(--border-color);
  padding: 15px 25px 12px;
  border-radius: 8px;
  margin: 5px 0;
}

.important-box.membership-box {
  display: block;
  min-width: auto;
  padding: 15px 25px 8px;
  margin: 20px 0;
}

.important-box .box-title,
.application-title,
.box-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  margin: -5px 0 12px 0;
  padding: 0 0 8px 0;
  line-height: 1.2;
}

.important-box .indent-item {
  margin: 4px 0 !important;
  padding-left: 1.5em;
  text-indent: -1.5em;
}

.important-box ul:last-child {
  margin-bottom: 5px;
}

.btn-container {
  display: flex;
  gap: 15px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.btn-container.center {
  justify-content: center;
  text-align: center;
  margin: 30px 0;
}

.btn-link,
.form-btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 25px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.3s;
  text-align: center;
}

.form-btn {
  padding: 12px 35px;
}

.btn-link:hover,
.form-btn:hover {
  background-color: #007a45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* --- Page Specific Styles --- */
/* Rules */
.version {
  text-align: right;
  margin-top: 40px;
  color: var(--text-sub);
  font-size: 14px;
}

/* Index */
.bold-list {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  margin: 15px 0;
  padding-left: 0;
}

.bold-list li {
  align-items: center;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  color: var(--primary-color);
  display: flex;
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.4;
  padding: 10px 5px;
  text-align: center;
}

.activity-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}

.activity-item {
  align-items: baseline;
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  gap: 15px;
  padding: 10px 0;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-date {
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 700;
  min-width: 100px;
}

.activity-content {
  flex: 1;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

.pc-br {
  display: none;
}

/* Materials */
.toc-list {
  padding-left: 20px;
  margin: 8px 0 5px;
}

.toc-link {
  color: var(--text-main);
  text-decoration: underline;
  font-weight: 700;
}

.toc-link:hover {
  text-decoration: none;
  color: var(--primary-color);
}

.item-flex-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin: 16px 0 10px;
}

.item-preview {
  width: 160px;
  flex-shrink: 0;
}

.item-preview img {
  width: 100%;
  height: auto;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  display: block;
}

.item-info {
  flex: 1;
}

.leaflet-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-color);
  line-height: 1.4;
}

.dashed-divider {
  border: none;
  border-top: 1px dashed #ddd;
  margin: 30px 0;
}

/* Membership Slider */
.slide-wrapper {
  width: 85%;
  margin: 20px auto 35px;
  position: relative;
}

.slide-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.slide-container::-webkit-scrollbar {
  display: none;
}

.slide-item {
  min-width: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-top: 20px;
}

.nav-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.nav-btn:hover {
  background: #007a45;
  transform: scale(1.1);
}

.page-indicator {
  font-weight: 700;
  min-width: 60px;
  text-align: center;
}

/* Helper Utility Classes (Replacing Inline Styles) */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-5 { margin-bottom: 5px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-5-bold { margin: 0 0 5px; font-weight: 700; }
.text-primary-bold { color: var(--primary-color); font-weight: 700; }

/* --- Footer --- */
footer {
  color: var(--primary-color);
  margin-top: 40px;
  padding: 1.5vw 0.5vw;
  text-align: center;
}

footer p {
  font-size: 1.27vw;
  margin: 0;
}

.sp-only {
  display: none;
}

/* --- Responsive Media Queries --- */
@media (min-width: 768px) and (max-width: 1000px) {
  .pc-br {
    display: inline;
  }
}

@media (min-width: 1101px) {
  body {
    padding-top: 95px;
  }

  .header-top {
    padding: 15px 20px;
  }

  .brand-small {
    font-size: 14px;
  }

  .brand-main {
    font-size: 24px;
  }

  .brand-en {
    font-size: 14px;
  }

  nav a {
    font-size: 16px;
    padding: 12px 15px;
  }

  footer p {
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 38vw;
  }

  .header-top {
    align-items: stretch;
    flex-direction: column;
    padding: 3.5vw 0 0;
  }

  .brand-link {
    box-sizing: border-box;
    display: block;
    padding: 0 2.3vw;
    text-align: center;
    width: 100%;
  }

  .brand-small {
    font-size: 3.4vw;
    margin-bottom: 0.5vw;
  }

  .brand-main {
    font-size: 4.2vw;
    line-height: 1.3;
  }

  .brand-en {
    font-size: 2.8vw;
  }

  nav {
    border-top: 1px solid #ccc;
    justify-content: center;
    margin-top: 2.3vw;
    overflow-x: auto;
    width: 100%;
  }

  nav a {
    border-right: 1px solid rgba(0, 96, 54, 0.25);
    flex: 1;
    font-size: 3.0vw;
    padding: 3.5vw 2vw;
    text-align: center;
  }

  nav a:first-child {
    border-left: none;
  }

  nav a:last-child {
    border-right: none;
  }

  .container {
    margin: -4.6vw auto 4.2vw;
    width: 92vw;
  }

  .card {
    border-radius: 2.3vw;
    padding: 0 4.6vw 5.8vw;
  }

  .section-title {
    font-size: 4.2vw;
    margin: 0 -4.6vw 3.5vw;
    padding: 1.8vw 0;
  }

  p,
  ul li,
  .activity-date,
  .activity-content,
  .important-box .indent-item {
    font-size: 3.6vw;
  }

  ul {
    padding-left: 5vw;
  }

  .bar-title {
    font-size: 4.0vw;
    margin: 25px 0 8px;
  }

  .section-hr {
    margin: 6.9vw 0 5.8vw;
  }

  .version {
    font-size: 3.2vw;
    margin-top: 9vw;
  }

  .gray-box {
    padding: 4.6vw;
    border-radius: 1.8vw;
    margin: 4.6vw 0 2.3vw;
  }

  .email-row {
    flex-direction: column;
    gap: 1.2vw;
  }

  .email-text {
    font-size: 3.8vw;
    word-break: break-all;
  }

  .email-note {
    font-size: 3.2vw;
  }

  .bold-list {
    flex-direction: column;
    gap: 1.8vw;
    margin: 15px 0;
  }

  .bold-list li {
    font-size: 3.6vw;
    padding: 2.8vw;
  }

  .activity-item {
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
  }

  .activity-date {
    min-width: auto;
  }

  .important-box {
    display: block;
    min-width: auto;
    padding: 4.6vw 4.6vw 3.5vw;
    border-radius: 1.8vw;
    margin: 1.5vw 0;
  }

  .important-box.membership-box {
    padding: 4.6vw 4.6vw 2.5vw;
  }

  .important-box .box-title,
  .application-title {
    font-size: 3.8vw;
    margin: -1.5vw 0 3.5vw 0;
    padding: 0 0 2.5vw 0;
  }

  .leaflet-name {
    font-size: 3.8vw;
    text-align: center;
  }

  .item-flex-container {
    flex-direction: column;
    gap: 3.5vw;
    margin-top: 4.6vw;
  }

  .item-preview {
    width: 100%;
    max-width: 50vw;
    margin: 0 auto;
  }

  .btn-container {
    flex-direction: column;
    gap: 2.3vw;
    align-items: center;
  }

  .btn-link,
  .form-btn {
    width: 55%;
    padding: 2.2vw 0;
    font-size: 3.6vw;
  }

  .slide-wrapper {
    width: 100%;
  }

  .slide-nav {
    gap: 5vw;
    margin-top: 4vw;
  }

  .nav-btn {
    width: 8.5vw;
    height: 8.5vw;
    font-size: 3.5vw;
  }

  .page-indicator {
    font-size: 3.8vw;
    min-width: 13vw;
  }

  .sp-only {
    display: inline;
  }

  footer {
    margin-top: 9vw;
  }

  footer p {
    font-size: 2.8vw;
    line-height: 1.5;
  }
}