/* =========================================================
   Base / Reset
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root{
  --bg: #ffce00;
  --text: #111;
  --yellow: yellow;
  --grayborder: #e5e5e5;
  --lightgrayborder: #eee;
  --lightergraybarckground: #fafafa;
  --boldhovercolor: black;
  --boldhoverbackground: white;
  --headergrad_start: rgba(194,198,249,0.68);
  --headergrad_end: rgba(218,239,236,0.92);
  --acutlogo_invert: 0%;
}

html[data-theme="hc"]{
  --bg: #e7e7e7;
  --yellow: black;
  --grayborder: black;
  --lightgrayborder: black;
  --lightergraybarckground: white;
  --headergrad_start: white;
  --headergrad_end: white;
  --acutlogo_invert: 100%;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Sans",
    "Yu Gothic", sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

html, body { margin: 0; padding: 0; }

.nowrap { white-space: nowrap; }

.break-control {
  word-break: keep-all;
  line-break: strict;
}

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

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

/* dictation */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

b {
  font-weight: inherit;
  background: inherit;
}

.bold {
  font-weight: 600;
}

div:hover > h3{
  color: var(--boldhovercolor);
  background-color: var(--boldhoverbackground);
}

div.table-wrap:hover p b{
  color: var(--boldhovercolor);
  background-color: var(--boldhoverbackground);
}

div.nohover:hover > h3{
  background-color: inherit !important;
}

.courses-table tbody tr:hover b {
  color: var(--boldhovercolor);
  background-color: var(--boldhoverbackground);
}

small {
  font-size: .8rem;
  color: #444;
  letter-spacing: 0;
  line-height: 1.15;
}

h2 > small {
  margin-left: 1em;
}

/* =========================================================
   Layout helpers
   ========================================================= */
.container {
  width: min(800px, calc(100% - 32px));
  margin-inline: auto;
}

.section {
  padding: clamp(48px, 6vw, 96px) 0;
}

.prose p {
  margin: 0 0 1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   Skip link
   ========================================================= */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 2px solid #111;
  border-radius: 10px;
  transform: translateY(-200%);
  transition: transform 120ms ease;
  z-index: 9999;
}

.skip-link:focus {
  transform: translateY(0);
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);

  background: linear-gradient(to bottom right, var(--headergrad_start), var(--headergrad_end));
  -webkit-backdrop-filter: blur(10px) brightness(1.15) saturate(1.05);
  backdrop-filter: blur(10px) brightness(2.25) saturate(1.05);
  isolation: isolate;
  border-bottom: 1px solid #e5e5e5;
  color: black;
}

.site-header::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: env(safe-area-inset-top);
  background: inherit;
  z-index: -1;
}

.primary-nav{
  opacity: var(--nav-opacity, 1);
  max-height: var(--nav-maxh, 400px);
  transition: opacity 120ms linear, max-height 160ms ease;
  padding-bottom: 12px;
  overflow: hidden;
}

.primary-nav ul{
  margin: 8px 0 0;
}

.site-header.nav-off .primary-nav ul{
  margin: 0;
}

.site-header.nav-off .primary-nav{
  pointer-events: none;
}

.header-inner {
  display: grid;
  grid-template-columns: auto auto auto 2fr;
  gap: 12px;
  align-items: center;
  padding: 20px 0 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  margin-left: 11px;
  margin-right: 5px;
}

.brand-en {
  margin-right: 12px;
}

.logo {
  height: 14px;
  width: auto;
  display: block;
}

.lang-nav {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.lang-nav a {
  text-decoration: none;
  font-size: 14px;
}

.lang-nav button {
  appearance: none;
  -webkit-appearance: none;

  background: none;
  border: 0;
  padding: 0;
  margin: 0;

  font-size: .9rem;
  color: inherit;
  text-decoration: none;
}

.primary-nav {
  grid-column: 1 / -1;
}

.primary-nav ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-size: 14px;
}

.primary-nav a:hover {
  border-color: #333;
  background-color: white;
}


/* =========================================================
   1. Hero (100vh)
   ========================================================= */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
}

.hero-inner {
  display: grid;
  place-items: center;

  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

.hero-logo {
  width: min(420px, 70vw);
  height: min(540px, 30vh);;
}

.stage {
  padding: 12px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.svg-row {
  display: flex;
  align-items: stretch;
  gap: var(--tileGap, 24px);
  overflow: hidden;

  max-width: 100%;
  justify-content: center;
}

.tile {
  width: var(--tileW, 200px);
  height: var(--tileH, 80px);
  flex: 0 0 auto;
  display: block;
}

/* 参考：色が必要なら */
.tile .st0 { fill: currentColor; }


.tile :is(rect, polygon, path, circle, ellipse, line, polyline) {
  animation: shapeColor 30s linear infinite;
  fill: red;
}

@keyframes shapeColor {
  0% { fill: #010e1e; }
  33.333% { fill: #1e0104; }
  66.666% { fill: #011e15; }
  100% { fill: #010e1e; }
}

.catchcopy {
  width: 100%;
  max-width: 100%;
  margin: 24px 0 0 5px;
}


/* =========================================================
   2. Overview content grid
   ========================================================= */

#overview .container {
  border-radius: 2px;
  border: 1px solid transparent;
}

#overview-title {
  background-color: white ;
}

p:hover b {
  background: white;
}

.overview-toggle {
  margin-top: 1rem;
}

.btn {
  appearance: none;
  font-size: 1rem;
  border: 1px solid currentColor;
  background: var(--lightergraybarckground);
  color: black;
  padding: 0.6rem 1rem;
  border-color: black;
  border-radius: 6px;
  cursor: pointer;
}

.btn.btn-head {
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.btn:hover {
  background: black;
  color: white;
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: white;

  border: 1px solid #333;
  border-radius: 2px;
  padding: 16px 12px;
  margin: 0 0 8px 0;
}

.overview-head > h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: 0.08em;
  font-weight: 400;
  font-family:
    -apple-system, "SF Pro Display", "Hiragino Sans", "Segoe UI",
    "Yu Gothic UI", "Meiryo", Roboto, "Noto Sans JP", "Noto Sans",
    system-ui, sans-serif;
}
.overview-buffer {
  margin-bottom: 6px;
}


/* =========================================================
   3. Detail content grid
   ========================================================= */
.media {
  margin: 0;
}

.media figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #444;
}

@media (min-width: 900px) {
  .content-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
  }
}

/* =========================================================
   4. Members grid + details accordion
   ========================================================= */
.members-grid {
  display: grid;
  gap: 16px;
}

#members-title {
  background-color: white ;
}


@media (min-width: 720px) {
  .members-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .members-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.member-card {
  border: 1px solid var(--grayborder);
  border-radius: 4px;
  padding: 10px;
  background: #fff;
}

.member-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
}

.member-card h3 {
  margin: 12px 8px 8px;
  font-size: 16px;
  text-decoration: none;
}

.member-card h3 small {
  margin-left: .5rem;
}

.member-card details {
  border-top: 1px solid var(--lightgrayborder);
  padding-top: 10px;
}

.member-card summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 14px;
  padding: 4px 5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.member-card summary::-webkit-details-marker {
  display: none; /* Safari */
}

.member-profile img {
  width: 45%;
  padding: 8px;
}

.member-profile {
  margin-top: 10px;
  font-size: 14px;
  color: #222;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.member-profile p {
  margin: 0;
  padding: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 640px) {
  .member-profile {
    flex-direction: column;
  }

  .member-profile img {
    width: 100%;
    padding: 18px;
  }
}

/* =========================================================
   5. Courses / program map / table
   ========================================================= */
#courses-title {
  background-color: white ;
}

.program-map {
  margin: 0 0 24px;
  overflow: hidden;
}

.program-map img {
  border-radius: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--lightgrayborder);
  border-radius: 14px;
  padding: 6px;
  margin: 0 0 20px;
}

.table-wrap p {
  padding: 12px 36px;
}

.plus-mark {
  margin-bottom: 20px;
}

.table-wrap + .plus-mark::before{
  content: "＋";
  text-align: center;
  color: var(--yellow);
  font-size: 1.6em;
  font-weight: 900;
  display: block;
  place-items: center;
}

.subject-title {
  text-align: center;
}

.courses-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.courses-table th,
.courses-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--lightgrayborder);
  vertical-align: top;
}

.courses-table tbody tr:last-child th,
.courses-table tbody tr:last-child td {
  border-bottom: 0;
}

.courses-table tr.tablesubhead {
  background: rgba(256,256,256,0.18);
}

.courses-table tbody th {
  text-align: left;
  font-weight: 600;
  width: 26%;
}

/*モバイル用*/
@media (max-width: 767px) {
  .table-wrap {
    overflow-x: visible;
  }
  .courses-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .courses-table tbody,
  .courses-table tr,
  .courses-table th,
  .courses-table td {
    display: block;
    width: 100%;
  }

  .courses-table tbody tr {
    border-bottom: 1px solid var(--lightgrayborder);
    padding: 12px 0;
  }
  .courses-table tbody tr:last-child {
    border-bottom: 0;
  }

  .courses-table tbody th {
    width: 100%; 
    padding: 12px 16px 6px;
    font-weight: 700;
  }

  .courses-table tbody td {
    padding: 0 16px 12px;
    border-bottom: 0;
  }

  .courses-table th,
  .courses-table td {
    border-bottom: 0;
  }
}


/* =========================================================
   6. admission
   ========================================================= */
#admission-title {
  background-color: white ;
}

.admission-wrap {
  overflow-x: auto;
  border: 1px solid var(--lightgrayborder);
  border-radius: 14px;
  padding: 10 30px;
  margin: 0 0 20px;
}

.admission-subtitle {
  text-align: center;
}

#admission-requirement:hover b {
  background: white;
}

#exam-content li {
  margin: 0;
}

#exam-content li:not(:last-of-type)::after {
  content: "⇣";
  font-size: 1.6em;
  display: block;
  color: var(--yellow);
}


#carriclum_for_adimission {
  margin-top: .5rem;
}

/* =========================================================
   7. Event card
   ========================================================= */
.event-card {
  border: 1px solid var(--grayborder);
  border-radius: 14px;
  padding: 24px;
  background: #fff;
  margin: 24px 0;
}

.event-card h3 {
  margin: 0 0 8px;
}

.event-card p {
  margin: 0;
  color: #222;
}

#events-title {
  background-color: white ;
}


/* =========================================================
   8. Button link (external form)
   ========================================================= */
#form-button a{
  place-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 3px;
  border: 1px solid #111;
  text-decoration: none;
  font-weight: 600;
}

.button:hover {
  background: white;
}

#form-title {
  background-color: white ;
}

/* =========================================================
   9. FAQ (no accordion)
   ========================================================= */
.faq-list {
  margin: 24px 0 0;
}

.faq-list dt {
  font-weight: 700;
  margin-top: 18px;
}

.faq-list dd {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #111;
  background: var(--lightergraybackground);
  border-radius: 3px;
}

.faq-list dt:first-child {
  margin-top: 0;
}

#faq-title {
  background-color: white ;
}

/* =========================================================
   10. Other section
   ========================================================= */
#other h3{
  margin-top: 36px;
}

#other div{
  text-align: center;
}

#other ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
  list-style: none;
}

#other li {
  margin: 6px 0;
  text-align: center;
}

#other-title {
  background-color: white ;
}

#jcsf-logo img {
  height: 150px;
  display: inline-block;
  margin: 48px 0 48px;
  padding: 0px;
  text-align: center;
}

#acut-logo img {
  height: 150px;
  display: inline-block;
  margin: 18px 0 48px;
  padding: 0px;
  text-align: center;
  filter: invert(var(--acutlogo_invert));
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--grayborder);
  background: #fff;
}

.footer-meta {
  margin: 0 0 8px;
  color: #444;
}

/* =========================================================
   Heading rhythm
   ========================================================= */
h2 {
  margin: 0 0 8 0px;
  padding: 16 12;
  border: 1px solid;
  border-color: #333;
  border-radius: 3px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  text-align-last: left;
  font-family:
    -apple-system,
    "SF Pro Display",
    "Hiragino Sans",
    "Segoe UI",
    "Yu Gothic UI",
    "Meiryo",
    Roboto,
    "Noto Sans JP",
    "Noto Sans",
    system-ui,
    sans-serif;

  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

h2 + div::before ,
h2 + figure::before ,
.overview-buffer::before,
figure:has(+ div)::after{
  content:"⇣";
  display: block;
  color: var(--yellow);

  font-size: 2em;
  text-align: center;
}

div + h2{
  margin-top: 60;
}

h3 {
  margin: 22px 10px 22px 10px;
  font-size: 18px;
  line-height: 1.3;
  text-decoration: underline;
  font-family:
    -apple-system,
    "SF Pro Display",
    "Hiragino Sans",
    "Segoe UI",
    "Yu Gothic UI",
    "Meiryo",
    Roboto,
    "Noto Sans JP",
    "Noto Sans",
    system-ui,
    sans-serif;

  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

#overview p::before,
#details p::before,
#admission-requirement p::before {
  content: url("./logo_indent.svg");
  display: inline-block;
  height: .9em;
  aspect-ratio: 4 / 1;
  transform: translateY(-.08em);
  width: auto;
  margin-right: 1em;
  vertical-align: middle;
}

#overview p:not(:last-of-type)::after,
#details p:not(:last-of-type)::after,
#admission-requirement p:not(:last-of-type)::after,
#admission-schedule p:not(:last-of-type)::after {
  content: "⇣";
  display: inline-block;
  color: var(--yellow);
}

/* =========================================================
   Small screens: header layout tweak
   ========================================================= */
@media (max-width: 560px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .primary-nav ul {
    gap: 8px;
  }

  .primary-nav a {
    padding: 7px 9px;
    font-size: 13px;
  }
}
