/* ============================================
   キャリア特集（career.html）と、トップの実話セクション用
   紙面トーン：新設部分のみに適用
   ============================================ */
:root {
  --paper: #ffffff;
  --ink: #0F172A;
  --ink-soft: #475569;
  --brand: #34c6be;
  --brand-deep: #0D47A1;
  --brand-tint: #E3F2FD;
  --amber: #F4511E;
  --amber-deep: #9c310c;
  --amber-tint: #FFF3EB;
  --line: #CBD5E1;
  --career-accent: #1976D2;
}

/* ---------- カリキュラムに続く高校生の実話 ---------- */
.story { background: #fff; color: var(--ink); padding: 64px 0; }
.story__inner { max-width: 1120px; margin: auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: center; }
.story__title { grid-column: 1 / -1; font-size: clamp(1.5rem, 2.4vw, 1.75rem); font-weight: 900; line-height: 1.55; margin: 0; }
.story__body { grid-column: 2; grid-row: 2; }
.story__text { font-size: 1.05rem; line-height: 1.85; }
.story__text + .story__text { margin-top: 14px; }
.story__visual { grid-column: 1; grid-row: 2; margin: 0; }
.story__diagram { display: block; width: 100%; height: auto; background: #f2f7fc; border-radius: 12px; }
.story__visual figcaption { margin-top: 6px; color: var(--ink-soft); font-size: .8rem; }
.story__links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.story__sub { color: var(--brand-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.story__diagram .machine { transform-origin: 89px 101px; }
.story__diagram .paddle { transform-origin: 247px 114px; }
.story__diagram.is-playing .machine { animation: story-swing .7s ease-in-out both; }
.story__diagram.is-playing .paddle { animation: story-swing .7s .68s ease-in-out both; }
.story__diagram.is-playing .ball { animation: story-hop .52s .96s ease-out both; }
@keyframes story-swing { 0%, 100% { transform: rotate(0); } 45% { transform: rotate(26deg); } }
@keyframes story-hop { 0%, 100% { transform: translate(0,0); } 45% { transform: translate(12px,-13px); } }
.hero__copy.hero__copy--intro { font-family: var(--font-ja); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.8; letter-spacing: .02em; max-width: 36em; margin-inline: auto; }
@media (max-width: 767px) {
 .story__body, .story__visual { grid-column: 1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
 .story__diagram.is-playing .machine, .story__diagram.is-playing .paddle, .story__diagram.is-playing .ball { animation: none; }
}

/* 紙面ボタン（トップ・特集共通） */
.c-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 100px;
  font-weight: 700; font-size: 1rem; line-height: 1.4; text-align: center;
  text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s;
}
.c-btn:hover { transform: translateY(-2px); }
.c-btn--main { background: var(--brand-deep); color: #fff; box-shadow: 0 4px 14px rgba(13,71,161,.18); }
.c-btn--line { background: #06C755; color: #052e14; box-shadow: 0 4px 14px rgba(6,199,85,.3); }
.c-btn--ghost { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.c-btn:focus-visible, .story__sub:focus-visible, .c-link:focus-visible, .career-top:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 3px;
}

/* ---------- トップ：簡潔な教育方針 ---------- */
.vision__lead { max-width: 720px; margin: 0 auto; text-align: center; }
.vision__lead p + p { margin-top: 12px; }
.vision__more { text-align: center; margin-top: 24px; }

/* ---------- 相談の入口 ---------- */
.consult { background: var(--brand-tint); color: var(--ink); padding: 80px 0; }
.consult__inner { max-width: 820px; margin: 0 auto; padding: 0 24px; text-align: center; }
.consult__title { font-family: var(--font-ja); font-weight: 900; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.45; margin-bottom: 16px; }
.consult__lead { margin-bottom: 28px; }
.consult__flow { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 28px; padding: 0; text-align: left; counter-reset: s; }
.consult__flow li {
  position: relative; background: #fff; border: 2px solid var(--line); border-radius: 16px;
  padding: 18px 16px 16px; font-size: .96rem; line-height: 1.65; counter-increment: s;
}
.consult__flow li::before {
  content: counter(s); display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--brand-deep); color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 8px;
}
.consult__flow li:nth-child(3)::before { background: var(--amber-deep); }
.consult__note { margin-bottom: 20px; font-weight: 500; }
.consult__btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.consult__small { margin-top: 18px; font-size: .88rem; color: var(--ink-soft); }

/* ---------- 特集ページ ---------- */
body.career { background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.85; }
.career-head { padding: 20px 24px 0; max-width: 1040px; margin: 0 auto; }
.career-top { display: inline-flex; gap: 6px; font-weight: 700; color: var(--brand-deep); text-decoration: none; padding: 8px 0; }
.career-top:hover { text-decoration: underline; text-underline-offset: 4px; }
.career-wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px 40px; }
.career-hero { padding: 40px 0 8px; max-width: 760px; }
.career-hero__label { font-family: var(--font-ja); font-weight: 700; color: var(--brand-deep); letter-spacing: .08em; font-size: .9rem; }
.career-hero h1 {
  font-family: var(--font-ja); font-weight: 900; font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.4;
  margin: 10px 0 22px; padding-bottom: 16px;
  background: linear-gradient(var(--career-accent), var(--career-accent)) left bottom / 96px 5px no-repeat;
}
.career-hero p { max-width: 36em; margin-bottom: 14px; }
.entry-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; padding: 0; }
.entry-chips li { background: var(--brand-tint); color: var(--ink); border-radius: 100px; padding: 6px 16px; font-weight: 700; font-size: .95rem; }
.bridge { font-family: var(--font-ja); font-weight: 900; font-size: 1.25rem; line-height: 1.6; color: var(--ink); margin-top: 22px; }

.chapter { margin-top: 80px; }
.chapter__no { font-family: var(--font-en); font-weight: 700; color: var(--brand-deep); letter-spacing: .1em; font-size: .85rem; }
.chapter__who { display: inline-block; background: var(--ink); color: #fff; font-weight: 700; font-size: .85rem; padding: 3px 14px; border-radius: 100px; margin-left: 10px; }
.chapter h2 {
  font-family: var(--font-ja); font-weight: 900; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.45;
  margin: 12px 0 24px; padding-bottom: 12px;
  background: linear-gradient(var(--career-accent), var(--career-accent)) left bottom / 72px 4px no-repeat;
}
.chapter__body { display: grid; grid-template-columns: 6fr 4fr; gap: 44px; align-items: start; }
.chapter__body--text { grid-template-columns: 1fr; }
.chapter__text p { margin-bottom: 14px; max-width: 36em; }
.chapter__photo img { width: 100%; border-radius: 20px; display: block; }
.chapter__photo figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: 8px; }

/* 図解：ラベルは本物のHTML、線・矢印は装飾 */
.diagram { margin-top: 36px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 26px 22px; }
.diagram__title { font-family: var(--font-ja); font-weight: 700; font-size: .95rem; color: var(--brand-deep); margin-bottom: 16px; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 0; }
.flow > li {
  flex: 1 1 0; background: var(--brand-tint); border-radius: 14px; padding: 14px 14px; font-weight: 700; line-height: 1.55;
  display: flex; flex-direction: column; justify-content: center; position: relative; text-align: center;
}
.flow > li small { display: block; font-weight: 400; font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.flow > li + li { margin-left: 34px; }
.flow > li + li::before {
  content: ""; position: absolute; left: -26px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-top: 3px solid var(--brand-deep); border-right: 3px solid var(--brand-deep); transform: rotate(45deg); pointer-events: none;
}
.flow > li.is-amber { background: var(--amber-tint); }
.flow-back {
  margin-top: 12px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .92rem; color: var(--amber-deep);
}
.flow-back::before, .flow-back::after { content: ""; flex: 1; border-top: 3px dashed var(--amber); }
.flow-back::before { flex: 0 0 18px; }

.branch { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 0; }
.branch__root { grid-column: 1 / -1; justify-self: center; background: var(--brand-tint); border-radius: 14px; padding: 14px 24px; font-weight: 700; text-align: center; }
.branch__lines { grid-column: 1 / -1; height: 30px; position: relative; }
.branch__lines::before { content: ""; position: absolute; left: 50%; top: 0; height: 14px; border-left: 3px solid var(--brand-deep); }
.branch__lines::after { content: ""; position: absolute; left: 25%; right: 25%; top: 14px; height: 16px; border: 3px solid var(--brand-deep); border-bottom: none; }
.branch__leaf { background: var(--amber-tint); border-radius: 14px; padding: 14px 16px; text-align: center; font-weight: 700; grid-column: auto; }
.branch__leaf small { display: block; font-weight: 400; font-size: .84rem; color: var(--ink-soft); margin-top: 4px; }
.branch__leaf:nth-of-type(1) { grid-column: 1; }
.branch__leaf:nth-of-type(2) { grid-column: 3; }

/* 交流の節 */
.meet { margin-top: 88px; background: var(--amber-tint); border-radius: 28px; padding: 44px 40px; }
.meet h2 { font-family: var(--font-ja); font-weight: 900; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.45; margin-bottom: 18px; }
.meet__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 22px 0; }
.meet__col { background: #fff; border-radius: 16px; padding: 20px 20px; border-left: 6px solid var(--amber); }
.meet__col h3 { font-family: var(--font-ja); font-size: 1.05rem; margin-bottom: 6px; color: var(--amber-deep); }
.meet__photo { margin: 6px 0 26px; }
.meet__photo img { width: 100%; border-radius: 16px; }
.meet__photo figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: 6px; }
.meet__nc { max-width: 38em; }
.meet__nc ul { margin: 10px 0 14px 1.2em; }
.meet__nc li { margin-bottom: 4px; }
.meet__wish { font-weight: 700; margin-top: 8px; }

/* 次の一歩 */
.next { margin-top: 80px; }
.next__links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.next__card { display: block; border: 2px solid var(--line); background: #fff; border-radius: 20px; padding: 24px; text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.next__card:hover { border-color: var(--career-accent); transform: translateY(-2px); }
.next__card strong { display: block; font-family: var(--font-ja); font-size: 1.15rem; margin-bottom: 6px; }
.next__card span { font-size: .95rem; color: var(--ink-soft); }
.c-link { color: var(--brand-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.career-note { margin-top: 56px; font-size: .86rem; color: var(--ink-soft); }
.career-footer { text-align: center; padding: 32px 24px 48px; font-size: .85rem; color: var(--ink-soft); }

@media (max-width: 767px) {
  .story { padding: 48px 0; }
  .story__inner { grid-template-columns: 1fr; gap: 22px; padding: 0 20px; }
  .story__links { flex-direction: column; align-items: stretch; }
  .story__links .c-btn { width: 100%; }
  .story__sub { text-align: center; }
  .consult { padding: 52px 0; }
  .consult__inner { padding: 0 20px; }
  .consult__flow { grid-template-columns: 1fr; }
  .consult__btns { flex-direction: column; }
  .consult__btns .c-btn { width: 100%; }
  body.career { font-size: 16px; }
  .career-head, .career-wrap { padding-left: 20px; padding-right: 20px; }
  .chapter { margin-top: 52px; }
  .chapter__body { grid-template-columns: 1fr; gap: 22px; }
  .diagram { padding: 20px 16px; margin-top: 26px; }
  .flow { flex-direction: column; }
  .flow > li + li { margin-left: 0; margin-top: 30px; }
  .flow > li + li::before { left: 50%; top: -24px; margin: 0 0 0 -9px; transform: rotate(135deg); }
  .branch { grid-template-columns: 1fr; gap: 10px; }
  .branch__lines { display: none; }
  .branch__leaf:nth-of-type(1), .branch__leaf:nth-of-type(2) { grid-column: 1; }
  .meet { margin-top: 52px; padding: 28px 20px; border-radius: 22px; }
  .meet__cols { grid-template-columns: 1fr; }
  .next { margin-top: 52px; }
  .next__links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .c-btn, .next__card { transition: none; } }
