/* 홈 하단 텍스트 블록 (tgl-home.php)
   테마 색(#2b2b2b 글자, #41b2e0 링크, #89cade 메뉴 하늘색)과 Noto Sans KR 을 그대로 쓴다.
   강조는 한 곳: 교통 표의 도쿄 지하철 노선 배지(실제 노선 색과 역 번호). 나머지는 조용하게 */
.tgl-home{
  --ink:#2b2b2b;--ink-2:#515151;--ink-3:#767676;--line:#e3e3e3;--sky:#89cade;--sky-soft:#eef7fb;--link:#41b2e0;--hover:#ed3934;--navy:#14234b;
  margin:64px 0 32px;padding-top:48px;border-top:1px solid var(--line);
  color:var(--ink);font-family:"Noto Sans KR",sans-serif;font-size:16px;line-height:1.75;
  word-break:keep-all;overflow-wrap:break-word;font-variant-numeric:tabular-nums
}
.tgl-home [lang="ja"]{word-break:normal}
.tgl-home a{color:var(--link);text-underline-offset:3px}
.tgl-home a:hover{color:var(--hover)}
.tgl-home a:focus-visible,.tgl-home summary:focus-visible{outline:2px solid var(--link);outline-offset:3px;border-radius:4px}

/* 첫 문단: 학교를 한 문단으로 소개. 첫 문장이 답이라 크게 */
.tgl-home-lead{margin:0;max-width:62em;font-size:18px;line-height:1.8;color:var(--ink-2)}
.tgl-home-lead strong{color:var(--ink);font-weight:700}

/* 첫 문단 왼쪽 인증 로고(문부과학성 인정 일본어교육기관) */
.tgl-home-intro{display:flex;align-items:center;gap:32px}
.tgl-home-badge{flex:0 0 168px;width:168px;height:auto;display:block}
.tgl-home-intro .tgl-home-lead{flex:1 1 auto;min-width:0}

/* 소제목: 질문형 H2. 장식 없이 글자 굵기와 크기로만 구분 */
.tgl-home h2{position:relative;margin:56px 0 16px;padding-left:0;font-size:22px;font-weight:700;line-height:1.4;letter-spacing:-0.02em;color:var(--ink)}
.tgl-home p{margin:14px 0}
.tgl-home-note{margin:10px 0 0;font-size:14px;line-height:1.65;color:var(--ink-3)}
.tgl-home-more{margin:12px 0 0;font-size:15px;font-weight:700}
.tgl-home-more a{text-decoration:none}
.tgl-home-more a::after{content:" \2192"}

/* 표 공통 */
.tgl-home-table{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tgl-home table{width:100%;border-collapse:collapse;border:0;font-size:15px;line-height:1.6;margin:0;background:none}
.tgl-home th,.tgl-home td{padding:12px 14px;border:0;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;background:none}
.tgl-home thead th{font-size:13px;font-weight:700;color:var(--ink-3);background:none;border-bottom:1.5px solid var(--ink);white-space:nowrap;padding-top:8px;padding-bottom:8px}
.tgl-home td.num{text-align:right;white-space:nowrap}
.tgl-home td strong{font-weight:700;color:var(--ink)}

/* 학교 개요 표: 이름표 칸은 하늘색 바탕 */
.tgl-home tbody th[scope="row"]{width:128px;background:var(--sky-soft);font-weight:700;color:var(--ink);white-space:nowrap}

/* 교통 표: 도쿄 지하철 노선 배지. 색은 각 노선의 실제 표시 색 */
.tgl-home .ln{display:inline-flex;align-items:center;gap:6px;margin:2px 14px 2px 0;white-space:nowrap}
.tgl-home .ln b{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:26px;padding:0 6px;box-sizing:border-box;
  border:3px solid var(--c);border-radius:13px;background:#fff;color:var(--ink);font-size:11px;font-weight:700;letter-spacing:.02em;line-height:1}
.tgl-home .ln-t{--c:#009bbf}   /* 도자이선 */
.tgl-home .ln-h{--c:#9caeb7}   /* 히비야선 */
.tgl-home .ln-g{--c:#f39700}   /* 긴자선 */
.tgl-home .ln-a{--c:#e85298}   /* 도에이 아사쿠사선 */
.tgl-home .ln-je{--c:#c9252f}  /* JR 게이요선 */
.tgl-home .ln-je b{border-radius:5px}   /* JR 역 번호는 네모 표지 */
.tgl-home-access td.walk{font-weight:700;white-space:nowrap}
.tgl-home-access td{vertical-align:middle}

/* 학비 표: 합계 줄 */
.tgl-home tr.total td{font-weight:700;font-size:17px;border-top:1.5px solid var(--ink);border-bottom:1.5px solid var(--ink);background:var(--sky-soft)}

/* 자주 묻는 질문 */
.tgl-home details{border-bottom:1px solid var(--line)}
.tgl-home details:first-of-type{border-top:1.5px solid var(--ink)}
.tgl-home summary{cursor:pointer;list-style:none;position:relative;padding:16px 40px 16px 0;font-weight:700}
.tgl-home summary::-webkit-details-marker{display:none}
.tgl-home summary::after{content:"+";position:absolute;right:6px;top:13px;font-size:22px;font-weight:400;color:var(--ink-3)}
.tgl-home details[open] summary::after{content:"\2212"}
.tgl-home details p{margin:0;padding:0 0 18px;color:var(--ink-2)}

/* 미리보기 안내(공개 전 관리자·미리보기 주소에만) */
.tgl-home-preview{margin:40px 0 0;padding:8px 12px;background:#fff7d6;border:1px solid #f0d27a;border-radius:6px;font-size:13px;color:#6b5600}

/* 모바일: 여러 칸 표는 한 줄을 한 장의 카드로 쌓는다(옆으로 밀지 않아도 읽힘). 칸 이름은 data-label 에서 */
@media (max-width:600px){
  .tgl-home{margin-top:44px;padding:32px 16px 0;font-size:15px}
  .tgl-home-lead{font-size:16px}
  .tgl-home-intro{display:flow-root}
  .tgl-home-badge{float:left;width:92px;margin:4px 14px 6px 0}
  .tgl-home h2{margin-top:44px;font-size:19px}
  .tgl-home table{font-size:14.5px}
  .tgl-home th,.tgl-home td{padding:10px 10px}
  .tgl-home tbody th[scope="row"]{width:auto;white-space:normal;min-width:84px}
  .tgl-home-stack thead,.tgl-home-access thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tgl-home-stack table,.tgl-home-stack tbody,.tgl-home-stack tr,.tgl-home-stack td,
  .tgl-home-access table,.tgl-home-access tbody,.tgl-home-access tr,.tgl-home-access td{display:block;width:auto}
  .tgl-home-stack tr,.tgl-home-access tr{padding:12px 0;border-bottom:1px solid var(--line)}
  .tgl-home-stack tr:first-child,.tgl-home-access tr:first-child{border-top:1.5px solid var(--ink)}
  .tgl-home-stack td,.tgl-home-access td{position:relative;border:0;padding:3px 0 3px 7.2em;text-align:left;min-height:1.6em}
  .tgl-home-stack td::before,.tgl-home-access td::before{content:attr(data-label);position:absolute;left:0;top:5px;width:6.8em;font-size:12.5px;line-height:1.5;color:var(--ink-3)}
  .tgl-home-stack td:first-child,.tgl-home-access td:first-child{padding:0 0 6px;font-weight:700;font-size:16px}
  .tgl-home-stack td:first-child::before,.tgl-home-access td:first-child::before{content:none}
  .tgl-home-stack td.num{text-align:left}
  .tgl-home-stack td::before,.tgl-home-access td::before{font-weight:400}
  .tgl-home-fee td{padding-left:9em}
  .tgl-home-fee td::before{width:8.6em}
  .tgl-home-fee tr.total{background:var(--sky-soft);border-top:1.5px solid var(--ink);padding:12px 10px}
  .tgl-home-fee tr.total td{background:none;border:0;font-size:16px}
  .tgl-home-fee tr.total td:last-child{display:none}
  .tgl-home .ln{margin-right:10px}
}
/* 모바일 코스 목록: 왼쪽 목표 배지 + 큰 과정명 + 한 줄 설명 (센다이이쿠에이 코스 목록 방식) */
@media (max-width:600px){
  .tgl-home-courses{overflow:visible}
  .tgl-home-courses thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tgl-home-courses table,.tgl-home-courses tbody{display:block}
  .tgl-home-courses tr{display:grid;grid-template-columns:76px 1fr;column-gap:14px;row-gap:4px;padding:16px 0;border-bottom:1px solid var(--line)}
  .tgl-home-courses tr:first-child{border-top:1.5px solid var(--ink)}
  .tgl-home-courses td{display:block;border:0;padding:0}
  .tgl-home-courses td:nth-child(1){grid-row:1 / span 2;align-self:start;display:flex;align-items:center;justify-content:center;min-height:44px;padding:6px 4px;
    background:var(--navy);color:#fff;font-size:11.5px;font-weight:700;line-height:1.35;text-align:center;letter-spacing:-0.01em;border-radius:3px}
  .tgl-home-courses td:nth-child(2){font-size:17px;font-weight:700;line-height:1.45}
  .tgl-home-courses td:nth-child(2) a{color:var(--ink);text-decoration:none}
  .tgl-home-courses td:nth-child(2) a::after{content:" \203A";color:var(--link)}
  .tgl-home-courses td:nth-child(3){font-size:13.5px;line-height:1.6;color:var(--ink-3)}
}
/* 모바일 진로 실적: 코스 목록과 같은 네이비 배지 + 큰 인원 숫자 */
@media (max-width:600px){
  .tgl-home-results{overflow:visible}
  .tgl-home-results thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .tgl-home-results table,.tgl-home-results tbody{display:block}
  .tgl-home-results tr{display:grid;grid-template-columns:76px 1fr;column-gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}
  .tgl-home-results tr:first-child{border-top:1.5px solid var(--ink)}
  .tgl-home-results td{display:block;border:0;padding:0}
  .tgl-home-results td:nth-child(1){align-self:start;display:flex;align-items:center;justify-content:center;min-height:44px;padding:6px 4px;
    background:var(--navy);color:#fff;font-size:12px;font-weight:700;line-height:1.35;text-align:center;border-radius:3px}
  .tgl-home-results td:nth-child(2){font-size:13.5px;line-height:1.6;color:var(--ink-3)}
  .tgl-home-results td:nth-child(2) strong{display:inline-block;margin-right:2px;font-size:22px;line-height:1.2;color:var(--ink);letter-spacing:-0.01em}
}
/* 모바일 카드형 표: 칸 이름을 절대 위치 대신 2열 그리드로 둬서 긴 이름(비자 신청 (도쿄 입국관리국))이 두 줄이 돼도 아래 줄과 겹치지 않게 */
@media (max-width:600px){
  .tgl-home-stack td:not(:first-child),.tgl-home-access td:not(:first-child){display:grid;grid-template-columns:7.2em minmax(0,1fr);column-gap:0;align-items:baseline;padding:3px 0;min-height:0}
  .tgl-home-stack td:not(:first-child)::before,.tgl-home-access td:not(:first-child)::before{position:static;width:auto;padding-right:.6em}
  .tgl-home-fee td:not(:first-child){grid-template-columns:9em minmax(0,1fr);padding-left:0}
  /* 노선 칸은 배지가 여러 개라 그리드에 넣으면 배지마다 칸을 차지함. 라벨이 짧아 겹칠 일이 없으니 기존 방식 유지 */
  .tgl-home-access td[data-label="노선"]{display:block;padding:3px 0 3px 7.2em}
  .tgl-home-access td[data-label="노선"]::before{position:absolute;width:6.8em;padding-right:0}
}
/* 학비 표: 금액 칸 머리글도 금액과 같은 오른쪽 정렬 */
.tgl-home-fee thead th:nth-child(2),.tgl-home-fee thead th:nth-child(3){text-align:right}
/* 진로 실적: PC 에서도 인원 숫자를 먼저 읽히게 */
.tgl-home-results td strong{font-size:18px;letter-spacing:-0.01em}

/* PC 질문 레일: 왼쪽 열에 질문(H2), 오른쪽 열에 답(표·문단·FAQ).
   마크업은 그대로 두고 .tgl-home 을 2열 그리드로. 본문 한 줄이 약 50자로 줄고 일곱 질문이 왼쪽에 한 줄로 서서 훑어보기 쉬움 */
@media (min-width:961px){
  .tgl-home{--rail:280px;--gap:56px;display:grid;grid-template-columns:var(--rail) minmax(0,1fr);column-gap:var(--gap);align-items:start}
  .tgl-home>*{grid-column:2;min-width:0}
  .tgl-home>.tgl-home-intro{grid-column:1 / -1;display:grid;grid-template-columns:var(--rail) minmax(0,1fr);column-gap:var(--gap);align-items:start}
  .tgl-home-badge{width:168px}
  .tgl-home-intro .tgl-home-lead{max-width:none}
  /* 질문은 다음 두 요소와 같은 줄에서 시작(span 2). 각 질문 뒤에는 답 요소가 늘 2개 이상 */
  .tgl-home>h2{grid-column:1;grid-row:span 2;margin:64px 0 0;font-size:21px;line-height:1.45}
  .tgl-home>h2+*{margin-top:64px}
  .tgl-home>h2+p{margin-top:62px}
  .tgl-home>h2+.tgl-home-table thead th{padding-top:0}
  .tgl-home>p:last-child{margin-bottom:0}
}
/* 입학 시기 표: 학기 이름을 달력 모양 배지로. 코스·실적 배지와 같은 네이비에 위쪽 하늘색 띠(달력 철). 글자는 "4월 학기" 그대로 */
.tgl-home-intake td:first-child{vertical-align:middle}
.tgl-home .tgl-term{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:52px;height:50px;box-sizing:border-box;
  border-top:6px solid var(--sky);border-radius:4px;background:var(--navy);color:#fff;line-height:1.1;text-align:center;white-space:nowrap}
.tgl-home .tgl-term b{font-size:16px;font-weight:700;letter-spacing:-0.02em}
.tgl-home .tgl-term i{font-style:normal;font-size:10.5px;font-weight:700;opacity:.8;margin-top:2px}
.tgl-home-intake td{vertical-align:middle}
@media (max-width:600px){
  .tgl-home-intake.tgl-home-stack tr{display:grid;grid-template-columns:52px minmax(0,1fr);column-gap:16px;align-items:center}
  .tgl-home-intake.tgl-home-stack td:first-child{grid-row:1 / span 3;padding:0;align-self:start;margin-top:3px}
  .tgl-home-intake.tgl-home-stack td:not(:first-child){grid-column:2}
}
@media (prefers-reduced-motion:reduce){.tgl-home *{transition:none!important}}

