/*
 * Professional responsive design layer
 * Maintains existing content and form links while establishing an editorial,
 * accessible visual system across desktop, tablet, and mobile.
 * Goldline comparison-route extensions make the official contract-comparison guide discoverable at high-intent decision points.
 */

:root {
  --ks-navy: #0b1f3a;
  --ks-navy-deep: #061529;
  --ks-blue: #164e9d;
  --ks-blue-bright: #1d64c8;
  --ks-ink: #182230;
  --ks-muted: #516174;
  --ks-mist: #f5f8fc;
  --ks-line: #dce5f0;
  --ks-amber: #f59e0b;
  --ks-amber-deep: #d97706;
  --ks-white: #ffffff;
  --ks-radius: 18px;
  --ks-shadow-sm: 0 8px 22px rgba(11, 31, 58, 0.07);
  --ks-shadow-md: 0 18px 48px rgba(11, 31, 58, 0.12);
  --ks-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  background: var(--ks-white);
}

body {
  min-width: 320px;
  padding-top: 0 !important;
  color: var(--ks-ink);
  background: var(--ks-white);
  font-family:
    "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.015em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--ks-blue);
}

#root {
  overflow: clip;
}

main {
  padding-top: 96px;
  padding-bottom: 104px;
}

.container,
.max-w-7xl {
  width: min(100%, 1200px) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding-right: 32px !important;
  padding-left: 32px !important;
}

/* Header: reduce visual noise and elevate the most important action. */
nav.fixed.top-0 {
  background: rgba(6, 21, 41, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(6, 21, 41, 0.16);
  backdrop-filter: blur(14px);
}

nav.fixed.top-0 > .container > div {
  min-height: 56px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

nav.fixed.top-0 a:focus-visible,
nav.fixed.top-0 button:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #fbbf24 !important;
  outline-offset: 3px;
}

nav.fixed.top-0 .btn-cta {
  border-radius: 999px !important;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.22);
  font-weight: 800 !important;
  letter-spacing: 0.03em;
}

nav.fixed.top-0 > div:nth-child(2) {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

nav.fixed.top-0 > div:nth-child(2) a {
  min-height: 40px;
  padding: 9px 11px !important;
  font-size: 12px !important;
}

/* Readable hierarchy across a long-form educational site. */
main > section {
  scroll-margin-top: 104px;
}

main > section:not(:first-child) {
  padding-top: clamp(4.5rem, 8vw, 7rem) !important;
  padding-bottom: clamp(4.5rem, 8vw, 7rem) !important;
}

main > section:nth-of-type(odd):not(:first-child) {
  background: var(--ks-mist);
}

main h1,
main h2,
main h3,
main h4 {
  color: var(--ks-navy);
  text-wrap: balance;
}

main h1 {
  max-width: 15ch;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(2.1rem, 4.1vw, 4.15rem) !important;
  font-weight: 900;
  line-height: 1.38 !important;
  letter-spacing: 0.015em;
}

main h2 {
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.85rem, 3.2vw, 3rem) !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  letter-spacing: 0.02em;
}

main h3 {
  font-size: clamp(1.18rem, 1.7vw, 1.5rem) !important;
  line-height: 1.55 !important;
}

main p,
main li,
main td,
main th {
  line-height: 1.85;
}

main p {
  color: var(--ks-muted);
}

main p + p {
  margin-top: 0.9rem;
}

/* Hero: clear evidence-led narrative and unambiguous next steps. */
main > section:first-child {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 88% 7%,
      rgba(35, 105, 207, 0.11),
      transparent 28rem
    ),
    linear-gradient(180deg, #fff 0%, #f6f9fd 100%) !important;
}

main > section:first-child::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(48vw, 720px);
  height: 100%;
  content: "";
  background: linear-gradient(135deg, rgba(20, 78, 157, 0.04), transparent 62%);
}

main > section:first-child > div {
  padding-top: clamp(3.25rem, 7vw, 7rem) !important;
  padding-bottom: clamp(4.5rem, 8vw, 8rem) !important;
}

main > section:first-child img {
  aspect-ratio: 4 / 5;
  border: 7px solid #fff;
  border-radius: 24px !important;
  box-shadow: var(--ks-shadow-md) !important;
  object-fit: cover;
}

main > section:first-child h1::after {
  display: block;
  width: 68px;
  height: 4px;
  margin-top: 0.65em;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ks-amber), #fbbf24);
}

main > section:first-child .grid.grid-cols-1.sm\:grid-cols-2 > div {
  overflow: hidden;
  border: 1px solid #d9e6f6 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow: var(--ks-shadow-sm);
}

main > section:first-child .grid.grid-cols-1.sm\:grid-cols-2 > div:hover {
  transform: translateY(-2px);
}

main > section:first-child a[href="#contact"] {
  min-height: 56px;
  border-radius: 12px !important;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.2);
}

main > section:first-child a[href="#contact"]:last-child {
  color: var(--ks-blue) !important;
  border-color: var(--ks-blue) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: none;
}

/* Editorial section rhythm and card consistency. */
#for-you,
#why,
#results,
#testimonials,
#faq,
#process {
  position: relative;
}

#for-you .rounded-xl,
#why .rounded-xl,
#courses .rounded-xl,
#futouko .rounded-xl,
#results .rounded-xl,
#how-we-teach .rounded-xl,
#testimonials .rounded-xl,
#pricing .rounded-xl,
#counseling .rounded-xl,
#faq .rounded-xl {
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius) !important;
  box-shadow: var(--ks-shadow-sm);
}

#for-you [class*="bg-white"],
#why [class*="bg-white"],
#courses [class*="bg-white"],
#futouko [class*="bg-white"],
#results [class*="bg-white"],
#how-we-teach [class*="bg-white"],
#testimonials [class*="bg-white"],
#pricing [class*="bg-white"],
#counseling [class*="bg-white"] {
  background: rgba(255, 255, 255, 0.93) !important;
}

#courses button,
#results button,
#testimonials button,
#faq button {
  font-family: "Noto Sans JP", sans-serif;
}

#courses button:focus-visible,
#results button:focus-visible,
#testimonials button:focus-visible,
#faq button:focus-visible {
  outline: 3px solid var(--ks-amber) !important;
  outline-offset: 3px;
}

main a:not(nav a) {
  text-underline-offset: 0.18em;
}

main a[class*="bg-orange"],
main a.btn-cta,
#floating-cta a {
  border-radius: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.025em;
  transition:
    transform 180ms var(--ks-ease),
    box-shadow 180ms var(--ks-ease),
    background 180ms var(--ks-ease) !important;
}

main a[class*="bg-orange"]:hover,
main a.btn-cta:hover,
#floating-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.24) !important;
}

main a[class*="bg-orange"]:active,
main a.btn-cta:active,
#floating-cta a:active {
  transform: scale(0.98);
}

/* Tables: retain exact content while improving scanability. */
.course-comparison-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--ks-line) !important;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ks-shadow-sm);
}

.course-comparison-table th {
  color: #fff !important;
  background: var(--ks-navy) !important;
}

.course-comparison-table td,
.course-comparison-table th {
  padding: 0.95rem 1rem !important;
  vertical-align: middle;
  border-color: var(--ks-line) !important;
}

.course-comparison-table tbody tr:nth-child(even) {
  background: #f7faff;
}

/* Floating CTA: only appears after the visitor has begun reading, never on top of the initial evidence. */
#floating-cta {
  z-index: 45 !important;
  right: 24px !important;
  bottom: 24px !important;
  max-width: calc(100vw - 48px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 180ms var(--ks-ease),
    transform 180ms var(--ks-ease);
}

#floating-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#floating-cta a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.25rem !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(
    135deg,
    var(--ks-amber) 0%,
    var(--ks-amber-deep) 100%
  ) !important;
  box-shadow: 0 14px 30px rgba(154, 81, 9, 0.28) !important;
}

/* Footer shell injected into the static template. */
body > footer {
  margin-top: 0 !important;
  padding: 2rem 1.25rem !important;
  color: rgba(255, 255, 255, 0.74) !important;
  background: var(--ks-navy-deep) !important;
  font-size: 0.9rem;
}

body > footer p {
  margin: 0 !important;
}

body > footer a {
  color: #fcd34d !important;
  font-weight: 700;
}

@media (max-width: 1023px) {
  .container,
  .max-w-7xl {
    padding-right: 24px !important;
    padding-left: 24px !important;
  }

  main > section:first-child > div {
    gap: 2.75rem !important;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 68px;
  }

  body {
    font-size: 16px;
    line-height: 1.9;
  }

  main {
    padding-top: 60px;
    padding-bottom: 96px;
  }

  .container,
  .max-w-7xl {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  nav.fixed.top-0 > .container > div {
    min-height: 60px !important;
  }

  nav.fixed.top-0 > .container > div > a > div:first-child span {
    font-size: 7px !important;
  }

  nav.fixed.top-0 > .container > div > a > div:nth-child(2) span:first-child {
    font-size: 14px !important;
  }

  main > section {
    scroll-margin-top: 68px;
  }

  main > section:not(:first-child) {
    padding-top: 4.25rem !important;
    padding-bottom: 4.25rem !important;
  }

  main > section:first-child > div {
    padding-top: 2.5rem !important;
    padding-bottom: 4.75rem !important;
  }

  main > section:first-child h1 {
    max-width: 12ch;
    font-size: clamp(1.9rem, 8.5vw, 2.45rem) !important;
    line-height: 1.43 !important;
  }

  main > section:first-child .grid.grid-cols-1.sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }

  main > section:first-child .grid.grid-cols-1.sm\:grid-cols-2 > div {
    padding: 1rem !important;
  }

  main
    > section:first-child
    .grid.grid-cols-1.sm\:grid-cols-2
    > div
    > div
    > div:first-child {
    font-size: 1.55rem !important;
  }

  main
    > section:first-child
    .grid.grid-cols-1.sm\:grid-cols-2
    > div
    > div
    > div:last-child {
    margin-top: 0.25rem !important;
    font-size: 0.76rem !important;
  }

  main > section:first-child img {
    aspect-ratio: 16 / 10;
    border-width: 5px;
    border-radius: 18px !important;
  }

  main > section:first-child > div > div > div:first-child {
    order: 2 !important;
  }

  main > section:first-child > div > div > div:last-child {
    order: 1 !important;
  }

  main > section:first-child a[href="#contact"] {
    min-height: 54px;
  }

  main h2 {
    font-size: clamp(1.7rem, 7.4vw, 2.2rem) !important;
  }

  main h3 {
    font-size: 1.18rem !important;
  }

  #floating-cta {
    right: 14px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    left: 14px !important;
    max-width: none;
  }

  #floating-cta a {
    width: 100%;
    min-height: 54px;
    font-size: 0.93rem !important;
  }

  .course-comparison-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .course-comparison-table td:first-child,
  .course-comparison-table th:first-child {
    width: 144px !important;
    min-width: 144px !important;
    max-width: 144px !important;
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.ks-skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 0.7rem 1rem;
  color: #fff;
  border-radius: 10px;
  background: var(--ks-blue);
  box-shadow: var(--ks-shadow-md);
  transform: translateY(-160%);
  transition: transform 180ms var(--ks-ease);
}

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

#main-content:focus {
  outline: none;
}

/* Course-detail conversion path: preserve clear, uninterrupted tap targets. */
.ks-course-detail {
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.ks-course-detail #floating-cta {
  display: none !important;
}

.ks-course-detail a[data-ks-form-link="true"] {
  min-height: 54px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(245, 158, 11, 0.18);
}

@media (max-width: 767px) {
  .ks-course-detail .container {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  .ks-course-detail a[data-ks-form-link="true"] {
    width: 100%;
    min-height: 56px;
    font-size: 1rem;
  }
}

/* Growth architecture: trust, direct partnership, course discovery and editorial content. */
.ks-growth-section {
  position: relative;
  padding: clamp(4.75rem, 8vw, 7.5rem) 0;
  color: var(--ks-ink);
}

.ks-growth-container {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 32px;
}

.ks-growth-heading {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 5vw, 4.25rem);
}

.ks-growth-heading--center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.ks-growth-heading h2,
.ks-direct-contract h2,
.ks-stoaca h2,
.ks-social-hub h3 {
  margin: 0;
  color: var(--ks-navy);
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.ks-growth-heading h2,
.ks-direct-contract h2,
.ks-stoaca h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.45;
}

.ks-growth-heading > p:last-child,
.ks-direct-contract-lead > p,
.ks-stoaca-copy > p,
.ks-social-hub > p {
  margin-top: 1.25rem;
  color: var(--ks-muted);
  font-size: 1rem;
  line-height: 1.95;
}

.ks-eyebrow,
.ks-social-hub-label {
  margin: 0 0 0.75rem;
  color: var(--ks-amber-deep);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.ks-reasons {
  overflow: hidden;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5fd 100%);
}

.ks-reasons::before {
  position: absolute;
  top: -18rem;
  left: -15rem;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  background: rgba(29, 100, 200, 0.08);
  content: "";
}

.ks-reasons .ks-growth-container,
.ks-blog .ks-growth-container {
  position: relative;
}

.ks-reasons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ks-reason-card {
  position: relative;
  min-height: 300px;
  padding: 2rem 1.55rem 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(16, 74, 145, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(11, 31, 58, 0.08);
  transition:
    transform 180ms var(--ks-ease),
    box-shadow 180ms var(--ks-ease);
}

.ks-reason-card:hover {
  box-shadow: 0 20px 42px rgba(11, 31, 58, 0.15);
  transform: translateY(-4px);
}

.ks-reason-number {
  display: block;
  margin-bottom: 1.35rem;
  color: var(--ks-amber-deep);
  font-family: "Playfair Display", "Noto Serif JP", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ks-reason-number::after {
  display: block;
  width: 38px;
  height: 2px;
  margin-top: 0.55rem;
  background: var(--ks-amber);
  content: "";
}

.ks-reason-card h3,
.ks-value-item h3,
.ks-article-card h3 {
  margin: 0;
  color: var(--ks-navy);
  font-family: "Noto Serif JP", serif;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.65;
}

.ks-reason-card p,
.ks-value-item p,
.ks-article-card p {
  margin: 1rem 0 0;
  color: var(--ks-muted);
  font-size: 0.88rem;
  line-height: 1.9;
}

.ks-growth-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 2.75rem;
}

.ks-growth-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 56px;
  padding: 0.9rem 1.35rem;
  color: #fff !important;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--ks-amber) 0%,
    var(--ks-amber-deep) 100%
  );
  box-shadow: 0 12px 26px rgba(198, 110, 10, 0.2);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  transition:
    transform 180ms var(--ks-ease),
    box-shadow 180ms var(--ks-ease);
}

.ks-growth-cta:hover {
  box-shadow: 0 16px 32px rgba(198, 110, 10, 0.3);
  transform: translateY(-2px);
}

.ks-growth-cta:active {
  transform: scale(0.98);
}

.ks-growth-cta span,
.ks-text-link span {
  font-size: 1.2em;
  line-height: 1;
}

.ks-growth-cta--outline {
  width: 100%;
  margin-top: 1.4rem;
  color: var(--ks-navy) !important;
  border-color: #cbd8e8;
  background: #fff;
  box-shadow: none;
}

.ks-growth-cta--outline:hover {
  color: var(--ks-blue) !important;
  border-color: var(--ks-blue);
  box-shadow: var(--ks-shadow-sm);
}

.ks-direct-contract, #direct-contract {
  color: #ffffff !important;
  background-color: #0b2750 !important;
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(67, 135, 222, 0.28),
      transparent 22rem
    ),
    linear-gradient(132deg, #061529 0%, #0b2750 56%, #123b72 100%) !important;
}

#direct-contract p, #direct-contract span, #direct-contract li {
  color: rgba(255, 255, 255, 0.92) !important;
}

.ks-direct-contract h2,
.ks-direct-contract h3 {
  color: #fff;
}

.ks-direct-contract .ks-eyebrow {
  color: #f8c650;
}

.ks-direct-contract-lead > p,
.ks-direct-contract-lead .ks-direct-contract-note {
  color: rgba(255, 255, 255, 0.8);
}

.ks-direct-contract-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
}

.ks-direct-contract-note {
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem !important;
}

.ks-value-list {
  display: grid;
  gap: 0.8rem;
}

.ks-value-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background-color: rgba(14, 49, 96, 0.75);
  background: rgba(14, 49, 96, 0.75);
  box-shadow: 0 8px 24px rgba(0, 11, 31, 0.25);
}

.ks-value-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #f8c650;
  border: 1px solid rgba(248, 198, 80, 0.42);
  border-radius: 50%;
  font-family: "Playfair Display", serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.ks-value-item p {
  color: rgba(255, 255, 255, 0.92);
}

.ks-stoaca {
  background: #fffdf7;
}

.ks-stoaca-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}

.ks-stoaca-visual {
  position: relative;
  margin: 0;
}

.ks-stoaca-visual::before {
  position: absolute;
  z-index: 0;
  top: 10%;
  left: -5%;
  width: 32%;
  height: 76%;
  border-radius: 16px;
  background: linear-gradient(180deg, #f9c94a, #e3a50c);
  content: "";
}

.ks-stoaca-visual img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border: 7px solid #fff;
  border-radius: 20px;
  box-shadow: 0 22px 52px rgba(61, 46, 18, 0.2);
}

.ks-stoaca-copy .ks-check-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.65rem 0 2rem;
  padding: 0;
  list-style: none;
}

.ks-check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--ks-ink);
  font-size: 0.92rem;
  line-height: 1.75;
}

.ks-check-list li::before {
  position: absolute;
  top: 0.25em;
  left: 0;
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--ks-blue);
  content: "✓";
  font-size: 0.7rem;
  font-weight: 800;
}

.ks-stoaca-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.ks-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ks-blue) !important;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none !important;
}

.ks-text-link:hover {
  color: var(--ks-amber-deep) !important;
  text-decoration: underline !important;
  text-underline-offset: 0.3em;
}

.ks-blog {
  background: #f4f8fc;
}

.ks-blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: stretch;
}

.ks-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ks-article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.55rem 1.35rem;
  border: 1px solid #dbe6f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.06);
  transition:
    transform 180ms var(--ks-ease),
    box-shadow 180ms var(--ks-ease);
}

.ks-article-card:hover {
  box-shadow: var(--ks-shadow-md);
  transform: translateY(-4px);
}

.ks-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1.1rem !important;
  color: #718197 !important;
  font-size: 0.7rem !important;
  font-weight: 700;
  line-height: 1.4 !important;
}

.ks-article-meta span {
  padding: 0.35rem 0.55rem;
  color: var(--ks-blue);
  border-radius: 999px;
  background: #eaf3fe;
}

.ks-article-card h3 {
  font-size: 1rem;
}

.ks-article-card .ks-text-link {
  margin-top: auto;
  padding-top: 1.35rem;
}

.ks-social-hub {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 18px;
  background: var(--ks-navy);
  box-shadow: var(--ks-shadow-md);
}

.ks-social-hub h3 {
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.55;
}

.ks-social-hub-label {
  color: #f7c853;
}

.ks-social-hub > p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.ks-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.ks-social-card {
  display: grid;
  min-height: 72px;
  grid-template-columns: 25px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 0.4rem;
  align-items: center;
  padding: 0.65rem;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none !important;
}

.ks-social-card > span {
  grid-row: 1 / span 2;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--ks-navy);
  border-radius: 50%;
  background: #fff;
  font-size: 0.65rem;
  font-weight: 900;
}

.ks-social-card strong {
  font-size: 0.76rem;
  line-height: 1.2;
}

.ks-social-card small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.65rem;
}

.ks-social-card.is-coming-soon {
  opacity: 0.78;
}

.ks-content-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 3rem;
}

.ks-content-topics span {
  padding: 0.48rem 0.8rem;
  color: #52647a;
  border: 1px solid #d5e1ee;
  border-radius: 999px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

nav .ks-header-growth-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  color: rgba(255, 255, 255, 0.75);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

nav .ks-header-growth-link:hover {
  color: #f8c650;
}

@media (max-width: 1023px) {
  .ks-growth-container {
    padding-right: 24px;
    padding-left: 24px;
  }

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

  .ks-reason-card {
    min-height: auto;
  }

  .ks-blog-layout,
  .ks-direct-contract-layout,
  .ks-stoaca-grid {
    grid-template-columns: 1fr;
  }

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

  .ks-stoaca-visual {
    max-width: 760px;
  }
}

@media (max-width: 767px) {
  .ks-growth-section {
    padding: 4.5rem 0;
  }

  .ks-growth-container {
    padding-right: 20px;
    padding-left: 20px;
  }

  .ks-growth-heading {
    margin-bottom: 2.25rem;
  }

  .ks-growth-heading--center {
    text-align: left;
  }

  .ks-growth-heading h2,
  .ks-direct-contract h2,
  .ks-stoaca h2 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .ks-reasons-grid,
  .ks-article-grid {
    grid-template-columns: 1fr;
  }

  .ks-reason-card {
    padding: 1.45rem 1.3rem;
  }

  .ks-reason-number {
    margin-bottom: 0.85rem;
  }

  .ks-growth-cta-row,
  .ks-growth-cta {
    width: 100%;
  }

  .ks-direct-contract-layout {
    gap: 2rem;
  }

  .ks-value-item {
    grid-template-columns: 40px 1fr;
    padding: 1.1rem;
  }

  .ks-value-icon {
    width: 40px;
    height: 40px;
  }

  .ks-stoaca-grid {
    gap: 2rem;
  }

  .ks-stoaca-visual::before {
    top: 7%;
    left: -4%;
  }

  .ks-stoaca-visual img {
    border-width: 4px;
    border-radius: 14px;
  }

  .ks-stoaca-actions .ks-growth-cta,
  .ks-stoaca-actions .ks-text-link {
    width: 100%;
  }

  .ks-social-hub {
    padding: 1.35rem;
  }

  nav .ks-header-growth-link {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
  }
}

/* Keep the primary desktop navigation focused as the editorial links are added. */
@media (min-width: 768px) {
  nav a[href="#why"],
  nav a[href="#testimonials"],
  nav a[href="#how-we-teach"],
  nav a[href="#pricing"],
  nav a[href="#cancel-policy"],
  nav a[href="#counseling"] {
    display: none !important;
  }
}

/* Mobile polish for trust, direct-partnership and course-discovery sections. */
@media (max-width: 767px) {
  .ks-reasons .ks-growth-heading,
  .ks-blog .ks-growth-heading,
  .ks-stoaca-copy {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
  }

  .ks-reasons .ks-growth-heading h2::after,
  .ks-blog .ks-growth-heading h2::after,
  .ks-stoaca-copy h2::after {
    display: block;
    width: 44px;
    height: 3px;
    margin: 0.9rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ks-amber), #f8c650);
    content: "";
  }

  .ks-reasons .ks-growth-heading > p:last-child,
  .ks-blog .ks-growth-heading > p:last-child,
  .ks-stoaca-copy > p {
    max-width: 34rem;
    margin-right: auto;
    margin-left: auto;
  }

  .ks-reasons-grid {
    gap: 0.9rem;
  }

  .ks-reason-card {
    min-height: 0;
    padding: 1.6rem 1.25rem 1.45rem;
    border-color: rgba(16, 74, 145, 0.16);
    border-top: 3px solid var(--ks-amber);
    box-shadow: 0 12px 26px rgba(11, 31, 58, 0.08);
    text-align: center;
  }

  .ks-reason-number {
    width: 2.35rem;
    height: 2.35rem;
    margin: 0 auto 0.9rem;
    padding-top: 0.54rem;
    color: #fff;
    border-radius: 50%;
    background: var(--ks-blue);
    font-size: 0.78rem;
  }

  .ks-reason-number::after {
    display: none;
  }

  .ks-reason-card h3 {
    color: var(--ks-navy);
    font-size: 1.12rem;
    line-height: 1.55;
  }

  .ks-reason-card p {
    color: #52647a;
    font-size: 0.9rem;
    line-height: 1.85;
    text-align: left;
  }

  .ks-direct-contract {
    padding-top: 4.75rem;
    padding-bottom: 4.75rem;
    text-align: center;
  }

  .ks-direct-contract-lead > p,
  .ks-direct-contract-lead .ks-direct-contract-note {
    margin-right: auto;
    margin-left: auto;
  }

  .ks-direct-contract-note {
    max-width: 34rem;
    text-align: left;
  }

  .ks-value-list {
    gap: 0.85rem;
    text-align: left;
  }

  .ks-value-item {
    grid-template-columns: 44px 1fr;
    gap: 0.85rem;
    padding: 1.15rem 1rem;
    border-color: rgba(248, 198, 80, 0.28);
    background: rgba(255, 255, 255, 0.09);
  }

  .ks-value-icon {
    width: 44px;
    height: 44px;
    color: var(--ks-navy);
    border-color: transparent;
    background: #f8c650;
  }

  .ks-value-item h3 {
    color: #fff;
    font-size: 1rem;
    line-height: 1.55;
  }

  .ks-value-item p {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    line-height: 1.75;
  }

  .ks-stoaca {
    overflow: hidden;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .ks-stoaca-visual {
    margin: 0 auto;
  }

  .ks-stoaca-copy .ks-eyebrow {
    color: var(--ks-amber-deep);
  }

  .ks-stoaca-copy h2 {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
    line-height: 1.4;
  }

  .ks-check-list {
    padding: 1rem !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    text-align: left;
  }

  .ks-stoaca-actions {
    align-items: stretch;
  }

  .ks-stoaca-actions .ks-growth-cta {
    box-shadow: 0 12px 24px rgba(198, 110, 10, 0.24);
  }

  .ks-blog .ks-growth-heading h2 {
    color: var(--ks-navy);
  }

  .ks-article-card {
    padding: 1.45rem 1.2rem;
    border-top: 3px solid var(--ks-blue);
  }

  .ks-article-card h3 {
    color: var(--ks-navy);
    font-size: 1.05rem;
  }

  .ks-social-hub {
    padding: 1.6rem 1.25rem;
    text-align: center;
  }

  .ks-social-hub > p {
    margin-right: auto;
    margin-left: auto;
  }

  .ks-social-card {
    text-align: left;
  }
}

/* Tutor comparison and centrally aligned direct-partnership presentation. */
.ks-direct-contract-lead--center {
  max-width: 780px;
  margin: 0 auto clamp(2.25rem, 5vw, 3.75rem);
  text-align: center;
}

.ks-direct-contract-lead--center > p {
  margin-right: auto;
  margin-left: auto;
}

.ks-direct-contract-lead--center .ks-direct-contract-note {
  max-width: 710px;
  margin-top: 1.55rem;
  padding-top: 1.2rem;
  text-align: left;
}

.ks-value-list--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ks-value-list--three .ks-value-item {
  grid-template-columns: 1fr;
  gap: 1.1rem;
  padding: 1.7rem 1.35rem;
  text-align: center;
}

.ks-value-list--three .ks-value-icon {
  margin: 0 auto;
}

.ks-value-list--three .ks-value-item p {
  margin-top: 0.75rem;
  text-align: left;
}

.ks-tutor-comparison {
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6fd 100%);
}

.ks-tutor-comparison .ks-growth-heading {
  max-width: 840px;
}

.ks-comparison-intro {
  display: flex;
  gap: 1.35rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto 2.75rem;
  padding: 1.15rem 1.35rem;
  border: 1px solid #cfdeef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(11, 31, 58, 0.07);
}

.ks-comparison-intro-badge {
  flex: 0 0 auto;
  min-width: 174px;
  padding: 0.75rem 0.8rem;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ks-blue), #0b3574);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
}

.ks-comparison-intro p {
  margin: 0;
  color: var(--ks-ink);
  font-size: 0.96rem;
  line-height: 1.9;
}

.ks-comparison-intro strong {
  color: var(--ks-blue);
}

.ks-comparison-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #cbd9e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(11, 31, 58, 0.08);
  scrollbar-color: var(--ks-blue) #eaf1f8;
  scrollbar-width: thin;
}

.ks-comparison-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ks-ink);
  font-size: 0.86rem;
  line-height: 1.7;
  text-align: left;
}

.ks-comparison-table th,
.ks-comparison-table td {
  padding: 1.15rem 1rem;
  border-right: 1px solid #dbe5ef;
  border-bottom: 1px solid #dbe5ef;
  vertical-align: top;
}

.ks-comparison-table thead th {
  position: relative;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  color: #fff;
  background: var(--ks-navy);
  font-family: "Noto Serif JP", serif;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.ks-comparison-table thead th:first-child {
  min-width: 135px;
  border-top-left-radius: 17px;
}

.ks-comparison-table thead th:last-child {
  border-top-right-radius: 17px;
}

.ks-comparison-table thead .is-recommended {
  background: linear-gradient(145deg, #124d9c, #0a2e66);
  box-shadow: inset 0 4px 0 #f6bd35;
}

.ks-comparison-table tbody th {
  width: 140px;
  color: var(--ks-navy);
  background: #f5f8fc;
  font-size: 0.84rem;
  font-weight: 800;
}

.ks-comparison-table tbody td {
  min-width: 190px;
  color: #506176;
  background: #fff;
}

.ks-comparison-table tbody .is-recommended {
  min-width: 220px;
  color: #18345c;
  background: #f3f8ff;
}

.ks-comparison-table tbody .is-recommended strong {
  color: var(--ks-blue);
}

.ks-comparison-table tr:last-child th {
  border-bottom-left-radius: 17px;
}

.ks-comparison-table tr:last-child td:last-child {
  border-bottom-right-radius: 17px;
}

.ks-comparison-table th:last-child,
.ks-comparison-table td:last-child {
  border-right: 0;
}

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

.ks-comparison-disclaimer {
  margin: 0.8rem 0 0;
  color: #687a90;
  font-size: 0.75rem;
  line-height: 1.75;
}

.ks-decision-flow {
  max-width: 1080px;
  margin: clamp(3rem, 7vw, 5.5rem) auto 0;
  padding: clamp(2rem, 5vw, 3.6rem) clamp(1.25rem, 4vw, 3rem);
  border-radius: 20px;
  background: linear-gradient(135deg, #0a264d 0%, #114b96 100%);
  box-shadow: 0 18px 40px rgba(11, 44, 87, 0.22);
  text-align: center;
}

.ks-decision-flow-label {
  margin: 0 0 0.8rem;
  color: #f8c650;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.ks-decision-flow h3 {
  margin: 0;
  color: #fff;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.55;
}

.ks-decision-steps {
  display: flex;
  gap: 0.7rem;
  align-items: stretch;
  justify-content: center;
  margin-top: 2rem;
}

.ks-decision-steps article {
  flex: 1 1 0;
  min-width: 0;
  padding: 1rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  text-align: left;
}

.ks-decision-steps article > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-bottom: 0.65rem;
  color: var(--ks-navy);
  border-radius: 50%;
  background: #f8c650;
  font-family: "Playfair Display", serif;
  font-size: 0.7rem;
  font-weight: 800;
}

.ks-decision-steps article p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.75;
}

.ks-decision-steps article strong {
  color: #fff;
}

.ks-decision-arrow {
  align-self: center;
  color: #f8c650;
  font-size: 1.45rem;
  font-weight: 800;
}

.ks-decision-steps .is-destination {
  border-color: rgba(248, 198, 80, 0.72);
  background: rgba(248, 198, 80, 0.16);
}

.ks-tutor-comparison .ks-growth-cta-row {
  margin-top: 2.5rem;
}

@media (max-width: 1023px) {
  .ks-value-list--three {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
  }

  .ks-value-list--three .ks-value-item {
    grid-template-columns: 48px 1fr;
    text-align: left;
  }

  .ks-value-list--three .ks-value-icon {
    margin: 0;
  }

  .ks-decision-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ks-decision-arrow {
    display: none;
  }
}

@media (max-width: 767px) {
  .ks-direct-contract-lead--center {
    text-align: center;
  }

  .ks-direct-contract-lead--center .ks-direct-contract-note {
    text-align: left;
  }

  .ks-value-list--three .ks-value-item {
    grid-template-columns: 44px 1fr;
    text-align: left;
  }

  .ks-value-list--three .ks-value-icon {
    margin: 0;
  }

  .ks-comparison-intro {
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.15rem 1rem;
    text-align: center;
  }

  .ks-comparison-intro-badge {
    width: 100%;
  }

  .ks-comparison-intro p {
    font-size: 0.9rem;
  }

  .ks-comparison-scroll {
    margin-right: -20px;
    margin-left: -20px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .ks-comparison-scroll::after {
    display: block;
    padding: 0.55rem 20px;
    color: #61758c;
    background: #f5f9fd;
    content: "横にスライドして比較できます";
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
  }

  .ks-comparison-table {
    min-width: 880px;
    font-size: 0.8rem;
  }

  .ks-comparison-table th,
  .ks-comparison-table td {
    padding: 0.9rem 0.8rem;
  }

  .ks-comparison-disclaimer {
    margin-top: 0.8rem;
    font-size: 0.71rem;
  }

  .ks-decision-flow {
    margin-top: 3rem;
    border-radius: 16px;
  }

  .ks-decision-steps {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-top: 1.55rem;
  }

  .ks-decision-steps article {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem;
  }

  .ks-decision-steps article > span {
    width: 32px;
    height: 32px;
    margin: 0;
  }

  .ks-decision-steps article p {
    padding-top: 0.1rem;
  }
}

/* Fit the complete comparison matrix on tablet and desktop; keep swipe mode on phones. */
@media (min-width: 768px) {
  .ks-comparison-table {
    min-width: 0;
    table-layout: fixed;
  }

  .ks-comparison-table th,
  .ks-comparison-table td {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .ks-comparison-table thead th:first-child,
  .ks-comparison-table tbody th {
    width: 13%;
  }
}

/* Override legacy table rules so comparison copy always wraps inside its cell. */
.ks-comparison-table th,
.ks-comparison-table td {
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Grade-specific street-academy course links. */
.ks-street-academy-courses {
  margin-top: 1.5rem;
  padding: 1.15rem;
  border: 1px solid #d7e3f0;
  border-radius: 12px;
  background: #f7fbff;
}

.ks-street-academy-courses > p {
  margin: 0 0 0.8rem;
  color: var(--ks-blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ks-street-academy-courses > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ks-street-academy-course-link {
  display: flex;
  min-height: 45px;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  color: var(--ks-navy);
  border: 1px solid #bed1e7;
  border-radius: 7px;
  background: #fff;
  font-size: 0.83rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    border-color 160ms var(--ks-ease),
    background 160ms var(--ks-ease),
    color 160ms var(--ks-ease),
    transform 160ms var(--ks-ease);
}

.ks-street-academy-course-link:hover,
.ks-street-academy-course-link:focus-visible {
  color: #fff;
  border-color: var(--ks-blue);
  background: var(--ks-blue);
  transform: translateY(-2px);
}

.ks-street-academy-course-link:active {
  transform: scale(0.97);
}

.ks-street-academy-course-link span {
  color: var(--ks-gold);
  font-size: 1rem;
}

.ks-street-academy-course-link:hover span,
.ks-street-academy-course-link:focus-visible span {
  color: #fff;
}

@media (max-width: 520px) {
  .ks-street-academy-courses {
    padding: 1rem;
  }

  .ks-street-academy-courses > div {
    grid-template-columns: 1fr;
  }
}


/* Japanese body copy: preserve natural phrase boundaries on every section.
   One-line header/title/card elements keep their local nowrap rules. */
main :where(p, li, dd, dt, blockquote, figcaption, td, th, summary) {
  line-break: strict;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Chromium and newer WebKit can select Japanese phrase boundaries natively. */
@supports (word-break: auto-phrase) {
  main :where(p, li, dd, dt, blockquote, figcaption, td, th, summary) {
    overflow-wrap: normal;
    word-break: auto-phrase !important;
  }
}


/* Narrative copy outside framed components: centered, phrase-aware and orphan-resistant. */
main p[data-ks-narrative-copy="true"] {
  max-width: 52rem;
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center !important;
  text-wrap: pretty;
}

@supports (text-wrap: pretty) {
  main :where(p, li, dd, dt, blockquote, figcaption, td, th, summary) {
    text-wrap: pretty;
  }
}



/* Centered explanatory paragraphs use balanced lines before reducing type size. */
@supports (text-wrap: balance) {
  main p[data-ks-narrative-copy="true"] {
    text-wrap: balance;
  }
}


/* JavaScript marks natural Japanese phrase boundaries; phrases never split across lines. */
main .ks-phrase {
  display: inline-block;
  white-space: nowrap;
}


/* Let phrase-protected text inside checklist rows wrap within the remaining flex width. */
main .ks-phrase-flow {
  display: block;
  min-width: 0;
  flex: 1 1 0%;
}


/* Compact comparison cells may wrap between protected words without overflowing. */
.ks-comparison-table .ks-phrase {
  display: inline;
  max-inline-size: 100%;
  white-space: normal;
}

/* Keep the category and publication date within narrow article cards. */
.ks-article-meta > .ks-phrase {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}


/* On narrow cards, keep the date on its own row instead of allowing a clipped metadata line. */
.ks-article-meta > .ks-phrase {
  display: block;
  width: 100%;
  white-space: nowrap;
}


.ks-article-meta > .ks-phrase-flow {
  flex: 0 0 100%;
  width: 100%;
}


/* Comparison table: center every cell while preserving phrase-aware wrapping. */
.ks-comparison-table,
.ks-comparison-table th,
.ks-comparison-table td {
  text-align: center;
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: normal;
}

.ks-comparison-table th,
.ks-comparison-table td {
  vertical-align: middle;
}

.ks-comparison-table .ks-phrase {
  display: inline;
  max-inline-size: 100%;
  white-space: normal;
}

@media (max-width: 767px) {
  .ks-comparison-table th,
  .ks-comparison-table td {
    padding-inline: 0.72rem;
  }
}


/* Teacher spotlight: a centered authority profile with a navy-and-gold EIKEN value strip. */
#teacher .ks-teacher-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

#teacher .ks-teacher-portrait-column,
#teacher .ks-teacher-information-column {
  min-width: 0;
}

#teacher .ks-teacher-portrait-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#teacher .ks-teacher-portrait-frame {
  width: min(100%, 340px);
  margin-inline: auto;
}

#teacher .ks-teacher-portrait-frame > img {
  display: block;
  width: 100%;
  margin-inline: auto;
}

#teacher .ks-teacher-recognition-badge {
  right: 50% !important;
  transform: translateX(50%);
  text-align: center;
}

#teacher .ks-teacher-information-column {
  padding-top: clamp(0rem, 1vw, 0.65rem);
}

#teacher .ks-teacher-name-row {
  justify-content: center;
  margin-bottom: 0.7rem !important;
  text-align: center;
}

#teacher .ks-teacher-name {
  text-align: center;
}

#teacher .ks-teacher-role {
  display: block;
  margin-inline: auto;
  text-align: center !important;
}

#teacher .ks-teacher-information-column > div:first-child {
  text-align: center;
}

#teacher .ks-teacher-information-column > div:first-child > * {
  justify-content: center;
}

#teacher .ks-teacher-value-strip {
  width: min(100%, 370px);
  margin: 1.2rem auto 0;
  padding: 0.95rem 0.9rem 1rem;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(224, 176, 63, 0.78);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(246, 189, 53, 0.16), transparent 46%),
    linear-gradient(135deg, #0a2f66, #071d3d);
  box-shadow: 0 12px 24px rgba(10, 38, 77, 0.18);
  text-align: center;
}

#teacher .ks-teacher-value-strip-label {
  margin: 0 0 0.55rem;
  color: #f6c44f;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

#teacher .ks-teacher-value-strip-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

#teacher .ks-teacher-value-strip-items span {
  padding-inline: 0.32rem;
  font-size: clamp(0.68rem, 1.25vw, 0.78rem);
  line-height: 1.55;
}

#teacher .ks-teacher-value-strip-items span + span {
  border-left: 1px solid rgba(246, 196, 79, 0.34);
}

#teacher .ks-teacher-value-strip-items b {
  display: block;
  color: #f7ca5d;
  font-size: 0.82rem;
}

@media (max-width: 1023px) {
  #teacher .ks-teacher-spotlight-grid {
    grid-template-columns: 1fr;
    gap: 2.1rem;
  }

  #teacher .ks-teacher-information-column {
    max-width: 780px;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  #teacher .ks-teacher-portrait-frame {
    width: min(100%, 300px);
  }

  #teacher .ks-teacher-value-strip {
    width: min(100%, 330px);
  }
}


/* Keep the portrait, name and role on one shared center axis at every viewport. */
#teacher .ks-teacher-spotlight-grid {
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 860px);
  margin-inline: auto;
  gap: 1.9rem;
}

#teacher .ks-teacher-information-column {
  width: min(100%, 760px);
  margin-inline: auto;
}


#teacher .ks-teacher-name-row {
  display: flex !important;
  width: 100%;
  align-items: center;
  justify-content: center !important;
}

#teacher .ks-teacher-role,
#teacher .ks-teacher-alma-mater {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto !important;
  text-align: center !important;
}


#teacher .ks-teacher-alma-mater {
  display: flex !important;
  width: fit-content !important;
  justify-content: center;
}


#teacher .ks-teacher-alma-mater-wrap {
  display: flex !important;
  width: 100%;
  justify-content: center;
}


/* The original identity row reserves a 16px visual inset; offset half of it to keep the name on the shared axis. */
#teacher .ks-teacher-name-row {
  position: relative;
  left: -8px;
}


/* Semantic Japanese copy: let the browser choose natural phrase boundaries.
   Never force a fixed-length phrase or shrink body type merely to fit one row. */
main :where(p, li, dd, dt, blockquote, figcaption, td, th, summary) {
  overflow-wrap: normal;
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* Give compact supporting copy an intentional reading rhythm instead of a dense wall of small type. */
main :where(p, li, dd, dt, blockquote, figcaption) {
  line-height: 2.05;
}

main :where(p, li, dd, dt, blockquote, figcaption) + :where(p, li, dd, dt, blockquote, figcaption) {
  margin-top: 1em;
}

.ks-reason-card p,
.ks-value-item p,
.ks-article-card p,
.ks-social-hub > p,
.ks-direct-contract-note,
.ks-check-list li,
#teacher li,
#teacher p {
  line-height: 2.05 !important;
}

.ks-reason-card p + p,
.ks-value-item p + p,
.ks-article-card p + p,
#teacher p + p,
#teacher li + li {
  margin-top: 1em !important;
}

.ks-article-meta,
.ks-social-card,
.ks-content-topics {
  row-gap: 0.85rem;
}

.ks-article-meta {
  line-height: 1.75 !important;
}

.ks-social-card {
  min-height: 82px;
}

@media (max-width: 767px) {
  main :where(p, li, dd, dt, blockquote, figcaption) {
    line-height: 2.1;
  }

  .ks-reason-card p,
  .ks-value-item p,
  .ks-article-card p,
  .ks-social-hub > p,
  .ks-direct-contract-note,
  .ks-check-list li,
  #teacher li,
  #teacher p {
    line-height: 2.12 !important;
  }
}


/* Protect only explicitly meaningful groups; all other Japanese copy stays free to wrap naturally. */
main .ks-semantic-group {
  display: inline-block;
  white-space: nowrap;
}


/* "For You" cards: centered cards with a vertically centered, left-aligned reading column. */
#for-you .ks-for-you-card-grid {
  justify-items: center;
}

#for-you .ks-for-you-card {
  width: min(100%, 360px);
  min-height: 100%;
  align-items: center !important;
  text-align: left !important;
}

#for-you .ks-for-you-card-copy {
  flex: 1 1 0%;
  min-width: 0;
  margin: 0 !important;
  color: var(--ks-ink) !important;
  font-weight: 600;
  line-height: 1.9 !important;
  text-align: left !important;
}

@media (max-width: 767px) {
  #for-you .ks-for-you-card {
    width: min(100%, 340px);
    min-height: 84px;
    padding-block: 1rem;
  }

  #for-you .ks-for-you-card-copy {
    line-height: 1.85 !important;
  }
}


/* Card copy uses the whole available reading column before wrapping.
   Only text confirmed to fit stays on one line; other copy keeps natural Japanese wrapping. */
main .ks-card-copy-one-line {
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
    text-wrap: nowrap !important;
}

main .ks-card-copy-one-line.ks-card-copy-font-fitted {
  font-size: var(--ks-card-copy-fit-size) !important;
}

/* On narrow screens, place the For You icon above the copy so the sentence can use the full card width. */
@media (max-width: 767px) {
  #for-you .ks-for-you-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  #for-you .ks-for-you-card > :first-child {
    align-self: flex-start;
  }

  #for-you .ks-for-you-card-copy {
    width: 100%;
    flex: 0 0 auto;
  }
}


/* "For You" cards: one-column, parent-facing headline cards. */
#for-you .ks-for-you-wide-card-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.85rem !important;
  width: min(100%, 940px) !important;
  margin-inline: auto !important;
}

#for-you .ks-for-you-card.ks-for-you-wide-card {
  display: grid !important;
  grid-template-columns: 3rem minmax(0, 1fr) !important;
  gap: 1rem !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 1.18rem 1.35rem !important;
  align-items: center !important;
  border: 1px solid rgba(15, 50, 93, 0.16) !important;
  border-left: 0.28rem solid #c79a45 !important;
  border-radius: 0.9rem !important;
  background: linear-gradient(105deg, #ffffff 0%, #fbfcff 100%) !important;
  box-shadow: 0 0.55rem 1.25rem rgba(15, 50, 93, 0.08) !important;
  color: var(--ks-ink) !important;
  text-align: left !important;
}

#for-you .ks-for-you-wide-card-icon {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid rgba(199, 154, 69, 0.45);
  border-radius: 50%;
  background: #fffaf0;
  font-size: 1.28rem;
  line-height: 1;
}

#for-you .ks-for-you-wide-card-content {
  min-width: 0;
}

#for-you .ks-for-you-wide-card-title {
  margin: 0 !important;
  color: #0d315f !important;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.12rem, 2.35vw, 1.46rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.015em !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

#for-you .ks-for-you-wide-card-body {
  margin: 0.28rem 0 0 !important;
  color: #4d5d74 !important;
  font-size: clamp(0.84rem, 1.55vw, 0.98rem) !important;
  font-weight: 500 !important;
  letter-spacing: 0.025em !important;
  line-height: 1.72 !important;
  text-align: left !important;
}

@media (max-width: 767px) {
  #for-you .ks-for-you-wide-card-list {
    gap: 0.68rem !important;
  }

  #for-you .ks-for-you-card.ks-for-you-wide-card {
    grid-template-columns: 2.55rem minmax(0, 1fr) !important;
    gap: 0.72rem !important;
    padding: 0.92rem 0.82rem !important;
    border-radius: 0.72rem !important;
  }

  #for-you .ks-for-you-wide-card-icon {
    width: 2.3rem;
    height: 2.3rem;
    font-size: 1.05rem;
  }

  #for-you .ks-for-you-wide-card-title {
    font-size: 1.02rem !important;
    line-height: 1.46 !important;
  }

  #for-you .ks-for-you-wide-card-body {
    margin-top: 0.22rem !important;
    font-size: 0.78rem !important;
    line-height: 1.68 !important;
  }
}


/* Keep the requested school-refusal support headline on one line at every viewport width. */
#for-you .ks-for-you-wide-card-title.ks-for-you-single-line-title {
  font-size: var(--ks-for-you-target-title-size) !important;
  letter-spacing: 0 !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}


/* Give the two counseling guidance sentences a full blank reading line between them. */
#for-you .ks-for-you-counseling-line-space {
  display: block;
  height: 1.8em;
}


/* Teacher profile: visually distinct evidence and value cards. */
#teacher .ks-teacher-profile-detail-card {
  position: relative !important;
  padding: 1.15rem 1.2rem !important;
  border: 1.5px solid rgba(199, 154, 69, 0.62) !important;
  border-left: 0.34rem solid #c79a45 !important;
  border-radius: 1rem !important;
  background: linear-gradient(115deg, #fffdf8 0%, #f8f3e8 100%) !important;
  box-shadow: 0 0.62rem 1.35rem rgba(15, 50, 93, 0.1) !important;
}

#teacher .ks-teacher-profile-detail-card > :first-child {
  color: #bd8927 !important;
}

#teacher .ks-teacher-profile-detail-card .font-bold {
  color: #0d315f !important;
}

#teacher .ks-teacher-manalink-card {
  position: relative !important;
  overflow: hidden !important;
  padding: clamp(1.35rem, 4vw, 2rem) !important;
  border: 2px solid #2563d9 !important;
  border-radius: 1.25rem !important;
  background: linear-gradient(125deg, #f7faff 0%, #e8f0ff 55%, #f5f8ff 100%) !important;
  box-shadow: 0 0.9rem 2rem rgba(37, 99, 217, 0.18) !important;
}

#teacher .ks-teacher-manalink-card::after {
  position: absolute;
  top: -3.5rem;
  right: -2.5rem;
  width: 10rem;
  height: 10rem;
  border-radius: 999px;
  background: rgba(37, 99, 217, 0.08);
  content: "";
  pointer-events: none;
}

#teacher .ks-teacher-manalink-card .font-bold {
  color: #103f9d !important;
  font-size: clamp(1.06rem, 2.7vw, 1.25rem) !important;
}

#teacher .ks-teacher-manalink-card a.ks-teacher-manalink-cta {
  position: relative;
  z-index: 1;
  border: 1px solid #1d4ed8 !important;
  border-radius: 0.85rem !important;
  background: linear-gradient(135deg, #1d4ed8 0%, #3477ed 100%) !important;
  box-shadow: 0 0.55rem 1rem rgba(29, 78, 216, 0.24) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

#teacher .ks-teacher-action-card {
  padding: clamp(1.2rem, 3.6vw, 1.65rem) !important;
  border: 1.5px solid rgba(224, 122, 53, 0.56) !important;
  border-radius: 1.2rem !important;
  background: linear-gradient(120deg, #fff8f1 0%, #fff1e7 100%) !important;
  box-shadow: 0 0.65rem 1.45rem rgba(202, 91, 31, 0.12) !important;
}

#teacher .ks-teacher-action-card .font-bold {
  color: #d26120 !important;
  font-size: clamp(1rem, 2.45vw, 1.2rem) !important;
}

@media (max-width: 767px) {
  #teacher .ks-teacher-profile-detail-card {
    gap: 0.8rem !important;
    padding: 1rem !important;
    border-left-width: 0.28rem !important;
  }

  #teacher .ks-teacher-manalink-card {
    padding: 1.25rem !important;
    border-width: 2px !important;
  }

  #teacher .ks-teacher-manalink-card a.ks-teacher-manalink-cta {
    width: 100% !important;
    justify-content: center !important;
  }

  #teacher .ks-teacher-action-card {
    padding: 1.15rem !important;
  }
}


@media (max-width: 767px) {
  #teacher .ks-teacher-manalink-card::after {
    display: none;
  }
}


/* Credentials: make qualifications and career history an unmistakable proof card. */
#teacher .ks-teacher-credentials-card {
  position: relative !important;
  overflow: hidden !important;
  padding: clamp(1.35rem, 4vw, 2rem) !important;
  border: 2px solid #c79a45 !important;
  border-top: 0.42rem solid #c79a45 !important;
  border-radius: 1.25rem !important;
  background: linear-gradient(125deg, #fffdf8 0%, #f9f1dd 52%, #fffaf0 100%) !important;
  box-shadow: 0 0.9rem 2rem rgba(160, 111, 24, 0.16) !important;
}

#teacher .ks-teacher-credentials-card h4 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem !important;
  color: #0d315f !important;
  font-size: clamp(1.12rem, 2.7vw, 1.32rem) !important;
}

#teacher .ks-teacher-credentials-card h4::before {
  display: inline-grid;
  width: 1.85rem;
  height: 1.85rem;
  place-items: center;
  border-radius: 50%;
  background: #c79a45;
  color: #fff;
  content: "✓";
  font-size: 1rem;
  font-weight: 900;
}

#teacher .ks-teacher-credentials-card li {
  position: relative;
  padding-block: 0.25rem;
  color: #35455c !important;
  font-weight: 600;
}

@media (max-width: 767px) {
  #teacher .ks-teacher-credentials-card {
    padding: 1.2rem !important;
    border-top-width: 0.34rem !important;
  }
}


/* Courses and pricing: use the same clear evidence-card language as the profile section. */
#courses {
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%) !important;
}

#courses .grid.grid-cols-1.gap-3 > button {
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(199, 154, 69, 0.5) !important;
  border-left: 0.34rem solid #c79a45 !important;
  border-radius: 0.82rem !important;
  background: linear-gradient(110deg, #ffffff 0%, #fffaf0 100%) !important;
  box-shadow: 0 0.48rem 1rem rgba(15, 50, 93, 0.08) !important;
}

#courses .grid.grid-cols-1.gap-3 > button:first-child {
  border-color: #c79a45 !important;
  background: linear-gradient(110deg, #fffaf0 0%, #f8edcf 100%) !important;
  box-shadow: 0 0.65rem 1.25rem rgba(160, 111, 24, 0.16) !important;
}

#courses .grid.grid-cols-1.gap-3 > button:hover {
  transform: translateY(-2px);
  border-color: #b57d1d !important;
  box-shadow: 0 0.72rem 1.35rem rgba(15, 50, 93, 0.14) !important;
}

#courses .rounded-2xl.overflow-hidden {
  border: 2px solid #c79a45 !important;
  border-top-width: 0.42rem !important;
  background: #fffdf8 !important;
  box-shadow: 0 1rem 2.1rem rgba(160, 111, 24, 0.15) !important;
}

#courses .rounded-xl.p-4.border {
  border-color: rgba(199, 154, 69, 0.5) !important;
  background: #fffaf0 !important;
}

#pricing {
  background: linear-gradient(180deg, #eef4fc 0%, #f7faff 100%) !important;
}

#pricing .rounded-2xl {
  border: 1.5px solid rgba(13, 49, 95, 0.32) !important;
  background: linear-gradient(125deg, #ffffff 0%, #f4f8ff 100%) !important;
  box-shadow: 0 0.72rem 1.55rem rgba(15, 50, 93, 0.1) !important;
}

#pricing .rounded-2xl h3,
#pricing .rounded-2xl h4 {
  color: #0d315f !important;
}

#pricing .bg-amber-50.rounded-2xl,
#pricing .bg-amber-50.border-2.rounded-2xl {
  border-color: #d79b26 !important;
  background: linear-gradient(125deg, #fffaf0 0%, #f9edcf 100%) !important;
  box-shadow: 0 0.78rem 1.65rem rgba(180, 125, 29, 0.14) !important;
}

#pricing .bg-blue-50 {
  border: 1.5px solid #3477ed !important;
  background: linear-gradient(120deg, #eff6ff 0%, #e5efff 100%) !important;
  box-shadow: 0 0.55rem 1.1rem rgba(37, 99, 217, 0.1) !important;
}

@media (max-width: 767px) {
  #courses .grid.grid-cols-1.gap-3 > button {
    padding: 0.92rem !important;
    border-left-width: 0.28rem !important;
  }

  #courses .rounded-2xl.overflow-hidden,
  #pricing .rounded-2xl {
    border-radius: 1rem !important;
  }
}


/* Comparison table: keep every cell self-contained at all viewport widths. */
#tutor-comparison .ks-comparison-scroll {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  border: 1px solid #cbd8e8;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.55rem 1.35rem rgba(15, 50, 93, 0.1);
}

#tutor-comparison .ks-comparison-table {
  width: 100% !important;
  min-width: 1120px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#tutor-comparison .ks-comparison-table th,
#tutor-comparison .ks-comparison-table td {
  min-width: 0 !important;
  padding: 1rem 0.8rem !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-break: strict;
  line-height: 1.62 !important;
  vertical-align: middle !important;
  text-align: center !important;
  white-space: normal !important;
}

#tutor-comparison .ks-comparison-table th:first-child,
#tutor-comparison .ks-comparison-table td:first-child {
  width: 17% !important;
  color: #0b2b54 !important;
  font-weight: 800 !important;
  background: #f2f6fc !important;
}

#tutor-comparison .ks-comparison-table th:not(:first-child),
#tutor-comparison .ks-comparison-table td:not(:first-child) {
  width: 20.75% !important;
}

#tutor-comparison .ks-comparison-table th *,
#tutor-comparison .ks-comparison-table td * {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#tutor-comparison .ks-comparison-scroll::after {
  display: block;
  padding: 0.7rem 1rem;
  color: #304966;
  background: #f3f7fc;
  content: "横にスライドして比較できます";
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

/* Dark-background areas: explicitly preserve readable contrast instead of inheriting muted body colours. */
#tutor-comparison .ks-decision-flow {
  border: 1px solid rgba(156, 199, 255, 0.5) !important;
  box-shadow: 0 1.1rem 2.2rem rgba(6, 31, 68, 0.28) !important;
}

#tutor-comparison .ks-decision-flow > h3 {
  color: #ffffff !important;
  text-shadow: 0 0.12rem 0.28rem rgba(0, 17, 44, 0.58);
}

#tutor-comparison .ks-decision-flow > p:not(.ks-decision-flow-label),
#tutor-comparison .ks-decision-flow .ks-decision-steps article p {
  color: #eaf3ff !important;
  opacity: 1 !important;
  text-shadow: 0 0.08rem 0.2rem rgba(0, 17, 44, 0.48);
}

#tutor-comparison .ks-decision-flow .ks-decision-steps article {
  border-color: rgba(166, 205, 255, 0.58) !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

#tutor-comparison .ks-decision-flow .ks-decision-steps article strong,
#tutor-comparison .ks-decision-flow .is-destination strong {
  color: #ffffff !important;
}

#tutor-comparison .ks-decision-flow .ks-decision-steps article > span:first-child {
  color: #0b1f3a !important;
  background: #f8c650 !important;
  box-shadow: 0 0.25rem 0.6rem rgba(0, 17, 44, 0.24);
}

/* Direct-guidance fit cards: preserve the user-specified Japanese phrase breaks on phones. */
@media (max-width: 767px) {
  #tutor-comparison .ks-decision-flow .ks-decision-steps .ks-decision-card-copy {
    padding-top: 0.08rem;
    font-size: clamp(0.61rem, 2.85vw, 0.75rem);
    line-height: 1.78;
    letter-spacing: 0;
  }
  #tutor-comparison .ks-decision-flow .ks-decision-mobile-line {
    display: block;
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  #tutor-comparison .ks-decision-flow .ks-decision-steps article {
    display: block;
  }
  #tutor-comparison .ks-decision-flow .ks-decision-steps article > span:first-child {
    margin-bottom: 0.48rem;
  }
}
#direct-contract :is(p, li) {
  color: #e8f2ff !important;
  opacity: 1 !important;
}

#direct-contract :is(h2, h3, h4, strong) {
  color: #ffffff !important;
}

@media (max-width: 767px) {
  #tutor-comparison .ks-comparison-table {
    min-width: 1000px !important;
  }

  #tutor-comparison .ks-comparison-table th,
  #tutor-comparison .ks-comparison-table td {
    padding: 0.9rem 0.68rem !important;
    font-size: 0.91rem !important;
    line-height: 1.58 !important;
  }
}


/* Preserve the dark consultation panel in pricing and explicitly keep its copy readable. */
#pricing .relative.overflow-hidden.rounded-2xl.bg-gradient-to-br {
  border: 2px solid rgba(111, 166, 244, 0.88) !important;
  background: linear-gradient(135deg, #0a264d 0%, #114b96 100%) !important;
  box-shadow: 0 1rem 2rem rgba(7, 38, 83, 0.25) !important;
}

#pricing .relative.overflow-hidden.rounded-2xl.bg-gradient-to-br :is(h2, h3, h4, strong) {
  color: #ffffff !important;
  text-shadow: 0 0.08rem 0.2rem rgba(0, 17, 44, 0.5);
}

#pricing .relative.overflow-hidden.rounded-2xl.bg-gradient-to-br :is(p, li, span) {
  color: #eaf3ff !important;
  opacity: 1 !important;
}

#pricing .relative.overflow-hidden.rounded-2xl.bg-gradient-to-br a {
  color: #ffffff !important;
}


/* Keep the tutor-comparison introduction visibly centered on every viewport. */
#tutor-comparison .ks-growth-heading.ks-growth-heading--center,
#tutor-comparison .ks-growth-heading.ks-growth-heading--center .ks-eyebrow,
#tutor-comparison .ks-growth-heading.ks-growth-heading--center h2 {
  width: 100% !important;
  margin-inline: auto !important;
  text-align: center !important;
}

#tutor-comparison .ks-growth-heading.ks-growth-heading--center .ks-eyebrow {
  display: block !important;
}


/* Make the direct-partnership heading read as a clear section title, not body copy. */
#direct-contract .ks-direct-contract-lead--center .ks-eyebrow {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0.36rem 0.9rem;
  color: #ffd76a !important;
  border: 1px solid rgba(255, 215, 106, 0.7);
  border-radius: 999px;
  background: rgba(248, 198, 80, 0.14);
  box-shadow: 0 0.4rem 1rem rgba(0, 11, 31, 0.3);
  font-size: clamp(0.72rem, 0.8vw, 0.9rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  line-height: 1 !important;
  text-shadow: 0 0.1rem 0.22rem rgba(0, 11, 31, 0.75);
}

#direct-contract .ks-direct-contract-lead--center h2 {
  position: relative;
  margin-top: 0.85rem !important;
  padding-bottom: 0.9rem;
  color: #ffffff !important;
  font-size: clamp(1.72rem, 3.2vw, 2.75rem) !important;
  font-weight: 900 !important;
  line-height: 1.34 !important;
  letter-spacing: 0.045em !important;
  text-shadow: 0 0.14rem 0.3rem rgba(0, 11, 31, 0.7);
}

#direct-contract .ks-direct-contract-lead--center h2::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(7rem, 28%);
  height: 0.22rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #dca92f, #ffe089, #dca92f);
  box-shadow: 0 0.16rem 0.45rem rgba(248, 198, 80, 0.4);
  content: "";
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  #direct-contract .ks-direct-contract-lead--center .ks-eyebrow {
    min-height: 1.9rem;
    padding-inline: 0.72rem;
  }

  #direct-contract .ks-direct-contract-lead--center h2 {
    margin-top: 0.72rem !important;
    padding-bottom: 0.75rem;
  }
}

/* Unified gold rule beneath every primary section heading.
   The site has a mix of React-rendered and dynamically inserted sections;
   targeting only the actual section H2 elements avoids changing card titles. */
#root main > section[id] h2 {
  position: relative;
  isolation: isolate;
  padding-bottom: 1rem !important;
}

#root main > section[id] h2::after {
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: 50%;
  display: block !important;
  width: clamp(6rem, 24%, 11rem) !important;
  height: 0.22rem !important;
  border-radius: 999px;
  background: linear-gradient(90deg, #dca92f 0%, #ffe089 50%, #dca92f 100%) !important;
  box-shadow: 0 0.16rem 0.45rem rgba(248, 198, 80, 0.42);
  content: "" !important;
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  #root main > section[id] h2 {
    padding-bottom: 0.86rem !important;
  }

  #root main > section[id] h2::after {
    width: clamp(5.75rem, 30%, 8rem) !important;
    height: 0.2rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #root main > section[id] h2::after {
    scroll-behavior: auto;
  }
}

/* Course detail headers use course-specific dark color bands. Keep their text
   independent from the site-wide heading/body rules so it never blends into a band. */
#courses .rounded-2xl.overflow-hidden > div:first-child {
  position: relative;
  isolation: isolate;
}

#courses .rounded-2xl.overflow-hidden > div:first-child :is(h1, h2, h3, h4, p, strong) {
  color: #ffffff !important;
  text-shadow: 0 0.1rem 0.22rem rgba(0, 20, 48, 0.56) !important;
}

#courses .rounded-2xl.overflow-hidden > div:first-child h3 {
  font-weight: 900 !important;
  letter-spacing: 0.025em !important;
}

#courses .rounded-2xl.overflow-hidden > div:first-child p {
  color: rgba(255, 255, 255, 0.94) !important;
  font-weight: 600 !important;
}

#courses .rounded-2xl.overflow-hidden > div:first-child .text-3xl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 0.68rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.22rem 0.55rem rgba(0, 18, 48, 0.22);
  line-height: 1;
}

@media (max-width: 767px) {
  #courses .rounded-2xl.overflow-hidden > div:first-child {
    padding: 1.25rem 1.15rem !important;
  }

  #courses .rounded-2xl.overflow-hidden > div:first-child h3 {
    font-size: clamp(1.18rem, 5.2vw, 1.42rem) !important;
    line-height: 1.4 !important;
  }

  #courses .rounded-2xl.overflow-hidden > div:first-child p {
    margin-top: 0.18rem !important;
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }
}

/* Let long course names use the text column beside their icon instead of
   forcing the entire header row wider than a mobile card. */
#courses .rounded-2xl.overflow-hidden > div:first-child .flex.items-center {
  min-width: 0;
}

#courses .rounded-2xl.overflow-hidden > div:first-child .flex.items-center > div {
  min-width: 0;
  flex: 1 1 auto;
}

#courses .rounded-2xl.overflow-hidden > div:first-child :is(h1, h2, h3, h4, p) {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal !important;
  word-break: normal;
}

/* The natural-copy helper may wrap course subtitles in protected spans.
   Release those spans inside the narrow detail-card header so long subtitles
   can wrap in the available text column instead of widening the card. */
#courses .rounded-2xl.overflow-hidden > div:first-child p,
#courses .rounded-2xl.overflow-hidden > div:first-child p * {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  word-break: normal !important;
  text-wrap: wrap !important;
}

#courses .rounded-2xl.overflow-hidden > div:first-child p span {
  display: inline !important;
}

/* Official logo showcase: a calm, high-trust identity moment before the profile. */
#teacher .ks-brand-logo-showcase {
  width: min(100%, 41rem);
  margin: -1.65rem auto clamp(2.25rem, 4vw, 3.25rem);
  padding: clamp(0.62rem, 1.3vw, 0.92rem) clamp(1rem, 2.2vw, 1.65rem) clamp(0.82rem, 1.6vw, 1.18rem);
  border: 1px solid rgba(199, 154, 69, 0.58);
  border-radius: 1.08rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 215, 106, 0.20), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 240, 0.96));
  box-shadow: 0 0.72rem 1.6rem rgba(15, 50, 93, 0.10);
  text-align: center;
}

#teacher .ks-brand-logo-showcase-label {
  margin: 0 0 0.28rem !important;
  color: #9b6c1b !important;
  font-family: "Noto Sans JP", sans-serif;
  font-size: clamp(0.56rem, 0.8vw, 0.66rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.19em;
  line-height: 1.45 !important;
}

#teacher .ks-brand-logo-showcase-image {
  display: block;
  width: min(100%, 34rem);
  height: auto;
  max-height: 11.35rem;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0.24rem 0.34rem rgba(15, 50, 93, 0.13));
}

@media (max-width: 767px) {
  #teacher .ks-brand-logo-showcase {
    width: calc(100% - 0.2rem);
    margin: -0.92rem auto 2rem;
    padding: 0.58rem 0.68rem 0.74rem;
    border-radius: 0.86rem;
  }

  #teacher .ks-brand-logo-showcase-label {
    margin-bottom: 0.15rem !important;
    font-size: 0.52rem !important;
  }

  #teacher .ks-brand-logo-showcase-image {
    width: 100%;
    max-height: none;
  }
}

/* Absorb the profile name and role into the official logo identity block. */
#teacher .ks-brand-logo-showcase-role {
  margin: clamp(0.4rem, 1vw, 0.68rem) 0 0 !important;
  color: #0f376d !important;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(0.86rem, 1.65vw, 1.22rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  line-height: 1.6 !important;
  text-align: center;
  text-wrap: balance;
}

#teacher .ks-brand-logo-showcase-role::before {
  content: "";
  display: block;
  width: clamp(4.6rem, 13vw, 7.2rem);
  height: 2px;
  margin: 0 auto 0.42rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #f8c650 24%, #ffd76a 50%, #f8c650 76%, transparent);
}

#teacher .ks-brand-absorbed-profile-name,
#teacher .ks-brand-absorbed-profile-role {
  display: none !important;
}

@media (max-width: 767px) {
  #teacher .ks-brand-logo-showcase-role {
    font-size: 0.82rem !important;
    letter-spacing: 0.045em;
    line-height: 1.5 !important;
    white-space: nowrap;
  }
}

/* Brand proof badges: keep authority visible without shrinking the logo itself. */
#teacher .ks-brand-logo-showcase-credentials {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.62rem;
  margin: 0.78rem auto 0;
  width: min(100%, 31rem);
}

#teacher .ks-brand-credential {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.42rem 0.7rem 0.48rem;
  border: 1px solid rgba(196, 151, 61, 0.64);
  border-radius: 0.62rem;
  background: linear-gradient(135deg, rgba(248, 198, 80, 0.16), rgba(255, 255, 255, 0.78));
  text-align: center;
}

#teacher .ks-brand-credential-label,
#teacher .ks-brand-credential-detail {
  display: block;
  font-family: "Noto Sans JP", sans-serif;
  text-align: center;
  white-space: nowrap;
}

#teacher .ks-brand-credential-label {
  color: #0f376d !important;
  font-size: clamp(0.68rem, 1.18vw, 0.84rem) !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
}

#teacher .ks-brand-credential-detail {
  margin-top: 0.08rem;
  color: #9b6c1b !important;
  font-size: clamp(0.58rem, 0.98vw, 0.7rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  line-height: 1.45 !important;
}

#teacher .ks-brand-absorbed-recognition,
#teacher .ks-brand-absorbed-academic {
  display: none !important;
}

@media (max-width: 767px) {
  #teacher .ks-brand-logo-showcase-credentials {
    gap: 0.42rem;
    margin-top: 0.62rem;
  }

  #teacher .ks-brand-credential {
    padding: 0.34rem 0.25rem 0.38rem;
    border-radius: 0.5rem;
  }

  #teacher .ks-brand-credential-label {
    font-size: 0.62rem !important;
  }

  #teacher .ks-brand-credential-detail {
    font-size: 0.53rem !important;
    letter-spacing: 0;
  }
}

/* Teacher trust overview: portrait first, proof points immediately beneath it. */
#teacher .ks-teacher-trust-overview {
  width: min(100%, 47rem);
  margin: 0 auto clamp(2.35rem, 5vw, 4.3rem);
  text-align: center;
}

#teacher .ks-teacher-centered-portrait {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto clamp(1.3rem, 3vw, 1.9rem);
}

#teacher .ks-teacher-centered-portrait > .relative {
  width: min(100%, 18rem);
  margin: 0 auto;
}

#teacher .ks-teacher-centered-portrait img[alt="プロ家庭教師 鈴木雄太"] {
  display: block;
  width: min(100%, 18rem) !important;
  max-height: 25rem !important;
  margin: 0 auto;
}

#teacher .ks-teacher-primary-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: 100%;
  margin: 0 !important;
  gap: clamp(0.46rem, 1.5vw, 0.8rem) !important;
}

#teacher .ks-teacher-primary-stats > div {
  min-width: 0;
  padding: clamp(0.66rem, 1.4vw, 0.86rem) clamp(0.25rem, 0.7vw, 0.5rem) !important;
  border-color: rgba(198, 151, 57, 0.55) !important;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 232, 0.92)) !important;
  box-shadow: 0 0.48rem 1.05rem rgba(15, 50, 93, 0.08);
}

#teacher .ks-teacher-primary-stats > div > div:first-child {
  color: #a36d15 !important;
  font-size: clamp(1rem, 2.15vw, 1.3rem) !important;
  line-height: 1.28 !important;
  white-space: nowrap;
}

#teacher .ks-teacher-primary-stats > div > div:last-child {
  color: #173e70 !important;
  font-size: clamp(0.6rem, 1.12vw, 0.76rem) !important;
  font-weight: 700;
  line-height: 1.45 !important;
}

#teacher .ks-teacher-biography {
  width: min(100%, 56rem);
  margin: 0 auto;
}

#teacher .ks-teacher-biography > .flex.items-center.gap-3.mb-2 {
  display: none !important;
}

@media (max-width: 767px) {
  #teacher .ks-teacher-trust-overview {
    margin-bottom: 2.35rem;
  }

  #teacher .ks-teacher-centered-portrait > .relative,
  #teacher .ks-teacher-centered-portrait img[alt="プロ家庭教師 鈴木雄太"] {
    width: min(100%, 15.25rem) !important;
  }

  #teacher .ks-teacher-primary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.52rem !important;
  }

  #teacher .ks-teacher-primary-stats > div {
    padding: 0.64rem 0.34rem !important;
  }

  #teacher .ks-teacher-primary-stats > div > div:first-child {
    font-size: 1.06rem !important;
  }

  #teacher .ks-teacher-primary-stats > div > div:last-child {
    font-size: 0.64rem !important;
  }
}

/* Preserve the requested semantic break in the teacher-profile highlight. */
#teacher .ks-experience-highlight-prefix,
#teacher .ks-experience-highlight-suffix {
  display: inline;
}

@media (max-width: 767px) {
  #teacher .ks-experience-highlight {
    text-align: left !important;
  }

  #teacher .ks-experience-highlight-prefix,
  #teacher .ks-experience-highlight-suffix {
    display: block;
    white-space: nowrap;
  }
}

/* Tablet and desktop framing for the instructor portrait. */
#teacher .ks-teacher-centered-portrait {
  display: grid;
  grid-template-columns: minmax(8.25rem, 1fr) auto minmax(8.25rem, 1fr);
  column-gap: clamp(0.75rem, 2.4vw, 1.6rem);
  align-items: center;
}

#teacher .ks-teacher-centered-portrait > .relative {
  grid-column: 2;
  margin: 0;
}

#teacher .ks-teacher-portrait-sidecard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  max-width: 12.25rem;
  padding: 0.9rem 0.72rem;
  border-top: 1px solid rgba(196, 151, 61, 0.75);
  border-bottom: 1px solid rgba(196, 151, 61, 0.42);
  color: #123d73;
  font-family: "Noto Sans JP", sans-serif;
}

#teacher .ks-teacher-portrait-sidecard-left {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

#teacher .ks-teacher-portrait-sidecard-right {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}

#teacher .ks-teacher-portrait-sidecard-eyebrow {
  color: #a26d16;
  font-size: clamp(0.5rem, 0.8vw, 0.62rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

#teacher .ks-teacher-portrait-sidecard strong {
  color: #0f376d;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(0.95rem, 1.55vw, 1.2rem);
  font-weight: 800;
  line-height: 1.55;
}

#teacher .ks-teacher-portrait-sidecard-copy {
  color: #4a637e;
  font-size: clamp(0.58rem, 0.9vw, 0.7rem);
  font-weight: 600;
  line-height: 1.72;
}

@media (max-width: 767px) {
  #teacher .ks-teacher-centered-portrait {
    display: flex;
  }

  #teacher .ks-teacher-portrait-sidecard {
    display: none;
  }

  #teacher .ks-experience-highlight {
    text-align: center !important;
  }
}

/* Match the tablet/desktop side-message rails to the instructor portrait height. */
@media (min-width: 768px) {
  #teacher .ks-teacher-centered-portrait {
    align-items: stretch;
  }

  #teacher .ks-teacher-centered-portrait > .relative {
    align-self: center;
  }

  #teacher .ks-teacher-portrait-sidecard {
    align-self: stretch;
    box-sizing: border-box;
    min-height: 18rem;
    justify-content: center;
    padding-block: clamp(1.15rem, 2vw, 1.6rem);
    background: linear-gradient(90deg, rgba(248, 198, 80, 0.07), rgba(255, 255, 255, 0));
  }

  #teacher .ks-teacher-portrait-sidecard-right {
    background: linear-gradient(270deg, rgba(248, 198, 80, 0.07), rgba(255, 255, 255, 0));
  }
}

/* Keep the portrait mathematically centered between equal side rails. */
@media (min-width: 768px) {
  #teacher .ks-teacher-centered-portrait {
    grid-template-columns: minmax(0, 1fr) 18rem minmax(0, 1fr);
  }
}

/* High-contrast correction for the dark achievement timeline. */
#star-case {
  color: #eaf3ff;
}

#star-case h2 {
  color: #ffffff !important;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.26);
}

#star-case h2 span {
  color: #ffd76a !important;
}

#star-case p {
  color: #dceaff !important;
}

#star-case .fade-in-up.rounded-2xl {
  background: #071a35;
  border-color: rgba(153, 190, 238, 0.26) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

#star-case .fade-in-up.rounded-2xl > .grid:not(:first-child) {
  border-color: rgba(153, 190, 238, 0.18) !important;
}

#star-case .fade-in-up.rounded-2xl > .grid:not(:first-child) > div {
  color: #e7f0ff !important;
  font-weight: 500;
}

#star-case .fade-in-up.rounded-2xl .inline-block {
  color: #ffe28a !important;
  background: rgba(248, 198, 80, 0.19) !important;
  border: 1px solid rgba(255, 215, 106, 0.42);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

#star-case .fade-in-up.rounded-2xl > .grid:first-child {
  background: #0b2c54 !important;
}

/* Mobile-safe two-line treatment for the star achievement headline. */
#star-case h2 .ks-starcase-headline-line {
  display: block;
}

#star-case h2 .ks-starcase-headline-plain {
  color: #ffffff !important;
}

#star-case h2 .ks-starcase-headline-gold {
  color: #ffd76a !important;
}

@media (max-width: 767px) {
  #star-case h2.ks-starcase-headline-fit {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.42;
    letter-spacing: -0.035em;
  }

  #star-case h2.ks-starcase-headline-fit .ks-starcase-headline-line {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-inline: auto;
    white-space: nowrap;
    letter-spacing: -0.035em;
  }
}

/* Prominent two-line hero subheadline, fitted to the available width by script. */
.ks-photo-hero .ks-hero-copy .ks-hero-secondary[data-ks-hero-subheadline-fit="true"] {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  text-align: center !important;
  color: #174a86 !important;
  font-weight: 800 !important;
  line-height: 1.34 !important;
  letter-spacing: -0.025em !important;
}

.ks-photo-hero .ks-hero-copy .ks-hero-secondary[data-ks-hero-subheadline-fit="true"] .ks-hero-subheadline-line {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  white-space: nowrap;
  text-align: center;
  letter-spacing: -0.025em;
}

/* Center every visual and text element in the teaching-features cards. */
.ks-feature-card-centered {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center !important;
}

.ks-feature-card-centered .ks-feature-card-icon-centered {
  flex: 0 0 auto;
  margin-inline: auto !important;
}

.ks-feature-card-centered h3 {
  width: 100%;
  margin-inline: auto !important;
  text-align: center !important;
}

.ks-feature-card-centered p {
  width: 100%;
  margin-inline: auto !important;
  text-align: center !important;
}

/* Credentials: wrap only between authored meaning units, never inside them. */
.ks-teacher-credentials-card.ks-credential-copy-flow > ul {
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 1rem !important;
}

.ks-teacher-credentials-card.ks-credential-copy-flow > ul > li {
  min-width: 0;
  align-items: flex-start !important;
  line-height: 1.85 !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-break: strict;
}

.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-copy {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-phrase {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

/* Keep the parenthetical tsushinsei support-school descriptor on one readable line. */
.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-phrase--compact {
  font-size: min(1em, clamp(0.74rem, 3.4vw, 0.9rem)) !important;
  letter-spacing: -0.065em;
  white-space: nowrap;
}

.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-fixed-item {
  width: 100%;
}

.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-copy--fixed-lines {
  display: block;
  width: 100%;
  min-width: 0;
}

.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-fixed-line {
  display: block;
  width: max-content;
  max-width: 100%;
  font-size: var(--ks-credential-fixed-size, inherit) !important;
  letter-spacing: -0.06em;
  line-height: 1.9;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .ks-teacher-credentials-card.ks-credential-copy-flow {
    padding: clamp(0.7rem, 3.5vw, 1rem) !important;
  }

  .ks-teacher-credentials-card.ks-credential-copy-flow > ul {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.15rem !important;
  }

  .ks-teacher-credentials-card.ks-credential-copy-flow > ul > li {
    position: relative;
    column-gap: 0 !important;
    padding-left: 1.15rem;
    font-size: clamp(0.94rem, 3.7vw, 1.04rem) !important;
    line-height: 1.9 !important;
  }

  .ks-teacher-credentials-card.ks-credential-copy-flow > ul > li > span:first-child:not(.ks-credential-copy) {
    position: absolute;
    top: 0.18em;
    left: 0;
  }
}

@media (min-width: 640px) {
  .ks-teacher-credentials-card.ks-credential-copy-flow > ul {
    column-gap: 1.75rem !important;
  }
}

/* Course section: the prescribed two-line title and phrase-led detail copy. */
#courses .ks-course-heading-fit {
  width: 100%;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center !important;
  text-wrap: initial !important;
}

#courses .ks-course-heading-fit .ks-course-heading-line {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  color: inherit;
  font-size: var(--ks-course-heading-size, inherit);
  line-height: 1.36;
  white-space: nowrap;
  text-align: center;
}

#courses .ks-course-detail-flow :is(p, li) {
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-break: strict;
}

#courses .ks-course-detail-flow .ks-course-copy-flow {
  text-wrap: pretty;
}

#courses .ks-course-detail-flow .ks-course-phrase {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

#courses .ks-course-detail-flow .ks-course-support-copy {
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.75;
}

@media (max-width: 639px) {
  #courses .ks-course-heading-fit {
    margin-bottom: 1.25rem !important;
  }

  #courses .ks-course-heading-fit .ks-course-heading-line {
    letter-spacing: -0.035em;
  }

  #courses .ks-course-detail-flow > div:not(:first-child) {
    padding: clamp(1.25rem, 5vw, 1.75rem) !important;
  }

  #courses .ks-course-detail-flow .ks-course-support-copy {
    font-size: clamp(0.79rem, 3.15vw, 0.9rem) !important;
  }
}

/* Section explanations: center short explanatory copy, while keeping dense detail copy left-aligned. */
#for-you .ks-for-you-wide-card-body,
.ks-reason-card p,
.ks-value-item p,
.ks-article-card p,
.ks-social-card p,
.ks-course-card > p {
  text-align: center !important;
}

#for-you .ks-for-you-wide-card-body {
  margin-inline: auto;
}

/* Keep the "For You" section headline centered on one line at every viewport. */
#for-you h2 {
  width: 100%;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
  font-size: clamp(1.25rem, 6.4vw, 2.25rem) !important;
  letter-spacing: -0.035em;
  white-space: nowrap;
  text-align: center !important;
}

/* Keep all nine For You card headings centered and on one line. */
#for-you .ks-for-you-wide-card-title {
  display: block;
  width: 100%;
  min-width: 0;
  margin-right: auto !important;
  margin-left: auto !important;
  font-size: clamp(0.83rem, 3.9vw, 1.4rem) !important;
  letter-spacing: -0.05em;
  line-height: 1.45;
  white-space: nowrap;
  text-align: center !important;
}

/* Direct-partnership benefit cards: one-line headings and phrase-led body wrapping. */
#direct-contract .ks-value-item > div {
  min-width: 0;
  flex: 1 1 auto;
}

#direct-contract .ks-value-item.ks-benefit-copy-fit h3 {
  width: 100%;
  min-width: 0;
  margin-right: auto !important;
  margin-left: auto !important;
  font-size: var(--ks-benefit-heading-size, clamp(0.9rem, 4.4vw, 1.7rem)) !important;
  letter-spacing: -0.055em;
  line-height: 1.45;
  white-space: nowrap;
  text-align: center !important;
}

#direct-contract .ks-value-item .ks-benefit-copy-flow {
  text-align: left !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-break: strict;
}

/* Direct-partnership cards: center the numeral inside its gold circle and preserve authored reading units. */
#direct-contract .ks-value-item .ks-value-icon {
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums lining-nums;
}

#direct-contract .ks-value-item .ks-benefit-copy-line {
  display: inline-block;
  white-space: nowrap;
}

/* The second benefit headline uses a slightly tighter rhythm to maximize one-line legibility. */
#direct-contract .ks-value-item:nth-of-type(2).ks-benefit-copy-fit h3 {
  letter-spacing: -0.095em;
}

@media (max-width: 639px) {
  #direct-contract .ks-value-item {
    display: block !important;
  }

  #direct-contract .ks-value-item .ks-value-icon {
    display: flex;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.8rem;
    align-items: center !important;
    justify-content: center !important;
  }

  #direct-contract .ks-value-item > div {
    width: 100%;
  }
}

#direct-contract .ks-value-item .ks-benefit-copy-phrase {
  display: inline-block;
  white-space: nowrap;
}

/* Support cases: retain the focused mobile reading flow on tablets and desktops. */
#futouko .grid.md\:grid-cols-3 {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100%;
  max-width: 52rem;
  margin-right: auto !important;
  margin-left: auto !important;
}

#futouko .grid.md\:grid-cols-3 > .rounded-2xl {
  width: 100%;
}

#futouko .grid.md\:grid-cols-3 .px-6.py-5 > div:last-child {
  min-width: 0;
  flex: 1 1 auto;
}

#futouko .grid.md\:grid-cols-3 .px-6.py-5 > div:last-child > p {
  display: block;
  width: 100%;
  min-width: 0;
  margin-right: auto !important;
  margin-left: auto !important;
  font-size: var(--ks-case-heading-size, clamp(0.78rem, 3.9vw, 1rem)) !important;
  letter-spacing: -0.045em;
  line-height: 1.4 !important;
  white-space: nowrap;
  text-align: center !important;
}

/* Stoaca lesson headline: display label and one-line centered fit. */
#stoaca .ks-stoaca-headline-fit {
  width: 100%;
  max-width: none !important;
  margin-right: auto !important;
  margin-left: auto !important;
  font-size: var(--ks-stoaca-heading-size, clamp(1rem, 5.3vw, 2.25rem)) !important;
  letter-spacing: -0.05em;
  line-height: 1.35;
  white-space: nowrap;
  text-align: center !important;
}

/* Credentials: one shared type scale; long items wrap only between meaningful phrases. */
.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-copy,
.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-phrase {
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Stoaca lesson: centered label and profile link, with visual directly after the introduction. */
#stoaca .ks-stoaca-grid.ks-stoaca-flow-ready {
  display: block;
  max-width: 52rem;
  margin-right: auto;
  margin-left: auto;
}

#stoaca .ks-stoaca-lesson-label {
  display: block;
  width: 100%;
  text-align: center !important;
}

#stoaca .ks-stoaca-copy > .ks-stoaca-visual {
  width: min(100%, 42rem);
  margin: 1.5rem auto 1.75rem;
  text-align: center;
}

#stoaca .ks-stoaca-copy > .ks-stoaca-visual img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

#stoaca .ks-stoaca-profile-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1.5rem auto 0;
  text-align: center !important;
}

/* Course recommendations: consistent, scan-friendly target lists. */
#courses .ks-course-recommendation-box {
  padding: clamp(1rem, 3vw, 1.35rem) !important;
}

#courses .ks-course-recommendation-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #4b5563;
  font-family: var(--font-sans-jp, sans-serif);
  font-size: clamp(0.9rem, 2.8vw, 1rem);
  line-height: 1.7;
  text-align: left;
}

#courses .ks-course-recommendation-list li {
  position: relative;
  padding-left: 1.45em;
}

#courses .ks-course-recommendation-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: #b9791d;
  content: '◯';
  font-weight: 800;
}

/* Credentials: small-phone fit and explicit two-line teaching history. */
.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-copy--stacked {
  display: block;
  width: 100%;
}
.ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-line {
  display: block;
  min-width: 0;
}

@media (max-width: 374px) {
  #teacher .ks-teacher-credentials-card.ks-credential-copy-flow {
    padding: 0.68rem !important;
  }
  .ks-teacher-credentials-card.ks-credential-copy-flow > ul {
    row-gap: 0.92rem !important;
  }
  .ks-teacher-credentials-card.ks-credential-copy-flow > ul > li {
    padding-left: 1rem !important;
    font-size: clamp(0.82rem, 3.72vw, 0.93rem) !important;
    letter-spacing: -0.035em;
    line-height: 1.78 !important;
  }
  .ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-phrase {
    max-width: calc(100vw - 4.45rem);
  }
  .ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-line + .ks-credential-line {
    margin-top: 0.16rem;
  }
}

@media (min-width: 375px) and (max-width: 639px) {
  .ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-line + .ks-credential-line {
    margin-top: 0.18rem;
  }
}

@media (max-width: 359px) {
  .ks-teacher-credentials-card.ks-credential-copy-flow > ul > li {
    font-size: 0.8rem !important;
    letter-spacing: -0.045em;
  }
}

@media (min-width: 640px) {
  .ks-teacher-credentials-card.ks-credential-copy-flow .ks-credential-line + .ks-credential-line {
    margin-top: 0.2rem;
  }
}

/* End credentials small-phone fit. */

/* Cache marker: 20260815 credential-small-fit1 */

/* Results-to-Stoaca boundary: make the change of section unmistakable. */
#results {
  position: relative;
  border-bottom: 1px solid rgba(10, 38, 77, 0.16);
}
#stoaca.ks-stoaca {
  position: relative;
  isolation: isolate;
  padding-top: clamp(5rem, 10vw, 7.5rem) !important;
  border-top: 5px solid #c99832;
  background:
    linear-gradient(180deg, rgba(255, 249, 232, 0.98) 0%, rgba(248, 251, 255, 0.98) 28rem),
    #f8fbff !important;
  box-shadow: inset 0 9px 0 #0a264d, inset 0 12px 0 rgba(248, 198, 80, 0.9);
}
#stoaca.ks-stoaca::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 2.05rem;
  left: 50%;
  width: min(12rem, 46vw);
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #c99832 18%, #f8c650 50%, #c99832 82%, transparent);
  box-shadow: 0 5px 14px rgba(10, 38, 77, 0.16);
}
#stoaca.ks-stoaca > * {
  position: relative;
  z-index: 1;
}
@media (max-width: 639px) {
  #stoaca.ks-stoaca {
    padding-top: 4.45rem !important;
    border-top-width: 4px;
    box-shadow: inset 0 7px 0 #0a264d, inset 0 10px 0 rgba(248, 198, 80, 0.9);
  }
  #stoaca.ks-stoaca::before {
    top: 1.7rem;
    width: min(9.5rem, 52vw);
  }
}
/* End results-to-Stoaca boundary. */

/* Cache marker: 20260815 results-stoaca-boundary1 */

/* Classroom showcase: promote the real lesson-screen visual without repeating copy already embedded in it. */
.ks-classroom-showcase-header {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 2.25rem auto 1.55rem;
  text-align: center;
}

.ks-classroom-showcase-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.3rem;
  margin: 0 !important;
  padding: 0.62rem 1.5rem 0.68rem;
  border: 1px solid rgba(184, 128, 28, 0.64);
  border-radius: 999px;
  background:
    linear-gradient(135deg, #ffe596 0%, #f8c650 45%, #dca537 100%);
  box-shadow:
    0 0.38rem 0.9rem rgba(166, 111, 18, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  color: #09274f !important;
  font-family: "Noto Serif JP", serif !important;
  font-size: clamp(1.4rem, 4.6vw, 2.25rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.035em;
  line-height: 1.35 !important;
  text-align: center !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
}

.ks-classroom-showcase-heading::before {
  content: "◆";
  display: inline-block;
  margin-right: 0.55rem;
  color: rgba(9, 39, 79, 0.78);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.55em;
  line-height: 1;
}

.ks-classroom-showcase-row {
  align-items: center !important;
  justify-content: center;
  width: 100%;
  max-width: 76rem;
  margin-right: auto !important;
  margin-left: auto !important;
}

.ks-classroom-showcase-row > div {
  min-width: 0;
}

.ks-classroom-showcase-row img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid rgba(203, 149, 42, 0.6);
  box-shadow: 0 0.85rem 2.2rem rgba(10, 38, 77, 0.2);
}

@media (max-width: 1023px) {
  .ks-classroom-showcase-header {
    margin-top: 1.75rem;
    margin-bottom: 1.25rem;
  }

  .ks-classroom-showcase-row > div:first-child {
    display: none !important;
  }

  .ks-classroom-showcase-row > div:last-child {
    width: min(100%, 52rem) !important;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 639px) {
  .ks-classroom-showcase-header {
    margin-top: 1.4rem;
    margin-bottom: 1rem;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .ks-classroom-showcase-heading {
    min-height: 3rem;
    max-width: 100%;
    padding: 0.58rem 1rem 0.64rem;
    font-size: clamp(1.24rem, 6.35vw, 1.7rem) !important;
    letter-spacing: 0.015em;
    white-space: nowrap;
  }

  .ks-classroom-showcase-heading::before {
    margin-right: 0.38rem;
  }

  .ks-classroom-showcase-row img {
    border-width: 1.5px;
    border-radius: 1rem !important;
  }
}

/* Global section rhythm: make every major section transition unmistakable without changing its content design. */
main > section:not(.ks-photo-hero):not(#stoaca) {
  position: relative;
  isolation: isolate;
}

main > section:not(.ks-photo-hero):not(#stoaca)::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 0.58rem;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    #f8c650 0,
    #d5a23b 48%,
    #0a264d 50%,
    #0a264d 100%
  );
  box-shadow: 0 0.2rem 0.52rem rgba(10, 38, 77, 0.22);
}

main > section:not(.ks-photo-hero):not(#stoaca)::after {
  content: '';
  position: absolute;
  z-index: 4;
  top: 0.48rem;
  left: 50%;
  width: min(11rem, 34vw);
  height: 0.16rem;
  transform: translateX(-50%);
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #fff3bd 26%, #f8c650 50%, #fff3bd 74%, transparent);
  box-shadow: 0 0.08rem 0.3rem rgba(248, 198, 80, 0.68);
}

@media (max-width: 639px) {
  main > section:not(.ks-photo-hero):not(#stoaca)::before {
    height: 0.48rem;
    box-shadow: 0 0.15rem 0.4rem rgba(10, 38, 77, 0.2);
  }

  main > section:not(.ks-photo-hero):not(#stoaca)::after {
    top: 0.38rem;
    width: min(8.5rem, 46vw);
    height: 0.12rem;
  }
}

/* Classroom support cards: make each teaching-support promise easy to scan and visually distinct. */
.ks-classroom-support-grid {
  gap: clamp(1rem, 2.4vw, 1.65rem) !important;
}

.ks-classroom-support-card {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: clamp(1.35rem, 3.2vw, 2rem) !important;
  border: 1px solid rgba(193, 145, 46, 0.45);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(248, 198, 80, 0.13), transparent 35%),
    linear-gradient(145deg, #ffffff 0%, #f6f9fd 100%);
  box-shadow:
    0 0.72rem 1.65rem rgba(10, 38, 77, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1), border-color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-classroom-support-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 0.22rem;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, #f8c650 24%, #c99832 50%, #f8c650 76%, transparent);
}

.ks-classroom-support-card::after {
  content: '';
  position: absolute;
  right: -2.8rem;
  bottom: -2.8rem;
  width: 7rem;
  height: 7rem;
  border: 1px solid rgba(248, 198, 80, 0.23);
  border-radius: 50%;
  pointer-events: none;
}

.ks-classroom-support-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem !important;
}

.ks-classroom-support-icon-wrap > div {
  width: 3rem !important;
  height: 3rem !important;
  border: 1px solid rgba(186, 129, 25, 0.42);
  background: linear-gradient(135deg, #ffe596, #e2ab38) !important;
  box-shadow: 0 0.36rem 0.8rem rgba(186, 129, 25, 0.19);
}

.ks-classroom-support-icon-wrap svg {
  width: 1.22rem !important;
  height: 1.22rem !important;
  color: #09274f !important;
  stroke-width: 2.7;
}

.ks-classroom-support-content {
  width: 100%;
  min-width: 0;
}

.ks-classroom-support-heading {
  width: 100%;
  margin: 0 !important;
  color: #0a264d !important;
  font-family: "Noto Serif JP", serif !important;
  font-size: clamp(1.08rem, 2.2vw, 1.5rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em;
  line-height: 1.48 !important;
  text-align: center !important;
  text-wrap: balance;
}

.ks-classroom-support-copy {
  margin: 0.82rem 0 0 !important;
  color: #4b5c72 !important;
  font-size: clamp(0.9rem, 1.55vw, 1rem) !important;
  line-height: 2 !important;
  text-align: left !important;
  text-wrap: pretty;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-break: strict;
}

@media (hover: hover) and (pointer: fine) {
  .ks-classroom-support-card:hover {
    transform: translateY(-0.28rem);
    border-color: rgba(193, 145, 46, 0.72);
    box-shadow:
      0 1rem 2.15rem rgba(10, 38, 77, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
  }
}

@media (max-width: 767px) {
  .ks-classroom-support-grid {
    gap: 0.95rem !important;
  }

  .ks-classroom-support-card {
    padding: 1.25rem 1.1rem 1.35rem !important;
    border-radius: 1.05rem;
  }

  .ks-classroom-support-icon-wrap {
    margin-bottom: 0.7rem !important;
  }

  .ks-classroom-support-icon-wrap > div {
    width: 2.72rem !important;
    height: 2.72rem !important;
  }

  .ks-classroom-support-heading {
    font-size: clamp(1.03rem, 5.15vw, 1.25rem) !important;
    line-height: 1.52 !important;
  }

  .ks-classroom-support-copy {
    margin-top: 0.7rem !important;
    font-size: clamp(0.89rem, 3.8vw, 0.98rem) !important;
    line-height: 1.93 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ks-classroom-support-card {
    transition: none;
  }
}

/* Preserve a comfortable reading edge beneath the centered classroom-support card headings. */
#how-we-teach .ks-classroom-support-card .ks-classroom-support-copy {
  text-align: left !important;
}

/* Classroom support transition: an internal chapter break distinct from the site-wide section dividers. */
#how-we-teach .ks-classroom-support-transition {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 66rem;
  margin: clamp(3.4rem, 7vw, 5.8rem) auto clamp(1.5rem, 3vw, 2.35rem);
  padding: clamp(2rem, 5vw, 3rem) clamp(1.2rem, 4vw, 2.8rem) clamp(1.85rem, 4.4vw, 2.65rem);
  border: 1px solid rgba(248, 198, 80, 0.72);
  border-radius: 1.35rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 16%, rgba(248, 198, 80, 0.24), transparent 27%),
    radial-gradient(circle at 10% 100%, rgba(31, 99, 190, 0.45), transparent 36%),
    linear-gradient(135deg, #071d3a 0%, #0a264d 48%, #114b96 100%);
  box-shadow:
    0 1rem 2.4rem rgba(10, 38, 77, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-align: center;
}

#how-we-teach .ks-classroom-support-transition::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  right: 10%;
  left: 10%;
  height: 0.34rem;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, #f8c650 22%, #fff3bd 50%, #f8c650 78%, transparent);
  box-shadow: 0 0.18rem 0.65rem rgba(248, 198, 80, 0.5);
}

#how-we-teach .ks-classroom-support-transition::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 14rem;
  height: 14rem;
  right: -5.5rem;
  bottom: -8.4rem;
  border: 1px solid rgba(248, 198, 80, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 0 1.3rem rgba(248, 198, 80, 0.07), 0 0 0 2.65rem rgba(248, 198, 80, 0.045);
}

#how-we-teach .ks-classroom-support-transition-eyebrow {
  margin: 0 0 0.58rem !important;
  color: #ffe596 !important;
  font-family: "Noto Sans JP", sans-serif !important;
  font-size: clamp(0.66rem, 1.5vw, 0.76rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.18em;
  line-height: 1.4 !important;
  text-align: center !important;
}

#how-we-teach .ks-classroom-support-transition-title {
  margin: 0 !important;
  color: #ffffff !important;
  font-family: "Noto Serif JP", serif !important;
  font-size: clamp(1.55rem, 3.5vw, 2.35rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em;
  line-height: 1.42 !important;
  text-align: center !important;
  text-shadow: 0 0.14rem 0.5rem rgba(0, 0, 0, 0.22);
  text-wrap: balance;
}

#how-we-teach .ks-classroom-support-transition-copy {
  max-width: 42rem;
  margin: 0.9rem auto 0 !important;
  color: #e4efff !important;
  font-family: "Noto Sans JP", sans-serif !important;
  font-size: clamp(0.88rem, 1.7vw, 1rem) !important;
  font-weight: 500 !important;
  line-height: 1.85 !important;
  text-align: center !important;
  text-wrap: balance;
}

@media (max-width: 639px) {
  #how-we-teach .ks-classroom-support-transition {
    margin-top: 2.9rem;
    margin-bottom: 1.25rem;
    padding: 1.7rem 1rem 1.55rem;
    border-radius: 1.1rem;
  }

  #how-we-teach .ks-classroom-support-transition::before {
    right: 15%;
    left: 15%;
    height: 0.26rem;
  }

  #how-we-teach .ks-classroom-support-transition-title {
    font-size: clamp(1.37rem, 6.25vw, 1.7rem) !important;
    line-height: 1.48 !important;
    letter-spacing: 0;
  }

  #how-we-teach .ks-classroom-support-transition-copy {
    margin-top: 0.7rem !important;
    font-size: clamp(0.82rem, 3.65vw, 0.93rem) !important;
    line-height: 1.8 !important;
  }
}

/* Course heading and course selector cards: protect iPhone mini widths from horizontal clipping. */
@media (max-width: 399px) {
  #courses .ks-course-heading-fit {
    width: calc(100% - 1.5rem) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  #courses .ks-course-heading-fit .ks-course-heading-line {
    max-width: 100%;
    font-size: clamp(1.05rem, 5.2vw, 1.28rem) !important;
    letter-spacing: -0.06em !important;
    line-height: 1.46 !important;
    overflow: visible !important;
  }

  #courses button.text-left.p-4.rounded-lg {
    min-width: 0;
    padding: 0.9rem !important;
  }

  #courses button.text-left.p-4.rounded-lg > div,
  #courses button.text-left.p-4.rounded-lg > div > div {
    min-width: 0;
  }

  #courses button.text-left.p-4.rounded-lg h4 {
    font-size: clamp(0.9rem, 4.05vw, 1.02rem) !important;
    line-height: 1.5 !important;
    letter-spacing: -0.035em;
    overflow-wrap: normal;
    word-break: normal;
  }

  #courses button.text-left.p-4.rounded-lg p {
    font-size: clamp(0.77rem, 3.42vw, 0.86rem) !important;
    line-height: 1.55 !important;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* Classroom visual hierarchy: section title above, lesson-screen frame directly on the visual. */
#how-we-teach > .container > .text-center.mb-12 {
  margin-bottom: clamp(1.8rem, 4vw, 2.7rem) !important;
}

#how-we-teach .ks-classroom-showcase-layout {
  display: block !important;
  width: 100%;
  margin: 0 auto !important;
}

#how-we-teach .ks-classroom-showcase-layout > div:first-child {
  display: none !important;
}

#how-we-teach .ks-classroom-showcase-layout > div:last-child {
  width: min(100%, 56rem) !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

#how-we-teach .ks-classroom-showcase-media {
  position: relative;
  isolation: isolate;
  overflow: hidden !important;
  border: 2px solid rgba(201, 152, 50, 0.74);
  border-radius: clamp(1rem, 2.2vw, 1.35rem) !important;
  background: #0a264d;
  box-shadow:
    0 1rem 2.4rem rgba(10, 38, 77, 0.2),
    0 0 0 0.3rem rgba(248, 198, 80, 0.12);
}

#how-we-teach .ks-classroom-showcase-media::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 32%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 26, 55, 0.38), rgba(6, 26, 55, 0));
}

#how-we-teach .ks-classroom-showcase-media > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit !important;
}

#how-we-teach .ks-classroom-showcase-label {
  position: absolute;
  z-index: 2;
  top: clamp(0.72rem, 2.2vw, 1.2rem);
  left: clamp(0.72rem, 2.2vw, 1.2rem);
  display: flex;
  max-width: calc(100% - 1.44rem);
  pointer-events: none;
}

#how-we-teach .ks-classroom-showcase-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  max-width: 100%;
  margin: 0 !important;
  padding: 0.46rem 0.92rem 0.5rem;
  border: 1px solid rgba(255, 239, 184, 0.86);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe69a 0%, #f8c650 48%, #d99d28 100%);
  box-shadow:
    0 0.4rem 0.88rem rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: #09274f !important;
  font-family: "Noto Serif JP", serif !important;
  font-size: clamp(1rem, 2.45vw, 1.34rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.018em;
  line-height: 1.35 !important;
  text-align: center !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

#how-we-teach .ks-classroom-showcase-heading::before {
  content: '◆';
  display: inline-block;
  margin-right: 0.38rem;
  color: rgba(9, 39, 79, 0.75);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.52em;
  line-height: 1;
}

@media (max-width: 639px) {
  #how-we-teach > .container > .text-center.mb-12 {
    margin-bottom: 1.35rem !important;
  }

  #how-we-teach .ks-classroom-showcase-layout > div:last-child {
    width: 100% !important;
  }

  #how-we-teach .ks-classroom-showcase-media {
    border-width: 1.5px;
    box-shadow:
      0 0.72rem 1.7rem rgba(10, 38, 77, 0.18),
      0 0 0 0.2rem rgba(248, 198, 80, 0.11);
  }

  #how-we-teach .ks-classroom-showcase-heading {
    min-height: 2.2rem;
    padding: 0.36rem 0.68rem 0.4rem;
    font-size: clamp(0.88rem, 4.35vw, 1.05rem) !important;
    letter-spacing: 0;
  }

  #how-we-teach .ks-classroom-showcase-heading::before {
    margin-right: 0.28rem;
  }
}

/* Learning-support photo: place the section copy in the intentionally open upper-right area. */
#how-we-teach figure.ks-classroom-support-transition {
  position: relative;
  isolation: isolate;
  display: block;
  width: min(100%, 66rem);
  max-width: 66rem;
  margin: clamp(3.4rem, 7vw, 5.8rem) auto clamp(1.5rem, 3vw, 2.35rem);
  padding: 0;
  border: 2px solid rgba(201, 152, 50, 0.72);
  border-radius: 1.35rem;
  overflow: hidden;
  background: #0a264d;
  box-shadow:
    0 1rem 2.4rem rgba(10, 38, 77, 0.22),
    0 0 0 0.34rem rgba(248, 198, 80, 0.1);
  text-align: initial;
}

#how-we-teach figure.ks-classroom-support-transition::before,
#how-we-teach figure.ks-classroom-support-transition::after {
  display: none;
}

#how-we-teach .ks-classroom-support-transition-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

#how-we-teach .ks-classroom-support-transition-panel {
  position: absolute;
  z-index: 1;
  top: clamp(0.9rem, 3.2vw, 2rem);
  right: clamp(0.9rem, 3.2vw, 2rem);
  width: min(48%, 29rem);
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.65rem);
  border: 1px solid rgba(255, 228, 135, 0.6);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(7, 29, 58, 0.93), rgba(10, 38, 77, 0.86));
  box-shadow:
    0 0.85rem 1.65rem rgba(5, 23, 48, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
  text-align: left;
}

#how-we-teach .ks-classroom-support-transition-panel::before {
  content: '';
  display: block;
  width: 4rem;
  height: 0.22rem;
  margin: 0 0 0.68rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe596, #f8c650);
  box-shadow: 0 0.12rem 0.45rem rgba(248, 198, 80, 0.35);
}

#how-we-teach .ks-classroom-support-transition-eyebrow {
  margin: 0 0 0.4rem !important;
  color: #ffe596 !important;
  font-family: "Noto Sans JP", sans-serif !important;
  font-size: clamp(0.61rem, 1.25vw, 0.73rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.15em;
  line-height: 1.4 !important;
  text-align: left !important;
}

#how-we-teach .ks-classroom-support-transition-title {
  margin: 0 !important;
  color: #ffffff !important;
  font-family: "Noto Serif JP", serif !important;
  font-size: clamp(1.25rem, 2.5vw, 2rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.005em;
  line-height: 1.4 !important;
  text-align: left !important;
  text-shadow: 0 0.14rem 0.5rem rgba(0, 0, 0, 0.25);
  text-wrap: balance;
}

#how-we-teach .ks-classroom-support-transition-copy {
  margin: 0.72rem 0 0 !important;
  color: #e5efff !important;
  font-family: "Noto Sans JP", sans-serif !important;
  font-size: clamp(0.78rem, 1.55vw, 0.98rem) !important;
  font-weight: 500 !important;
  line-height: 1.8 !important;
  text-align: left !important;
  text-wrap: balance;
}

@media (max-width: 639px) {
  #how-we-teach figure.ks-classroom-support-transition {
    margin-top: 2.9rem;
    margin-bottom: 1.25rem;
    border-width: 1.5px;
    border-radius: 1.05rem;
    box-shadow:
      0 0.72rem 1.7rem rgba(10, 38, 77, 0.18),
      0 0 0 0.2rem rgba(248, 198, 80, 0.1);
  }

  #how-we-teach .ks-classroom-support-transition-panel {
    top: 0.62rem;
    right: 0.62rem;
    width: 58%;
    padding: 0.65rem 0.68rem 0.72rem;
    border-radius: 0.72rem;
  }

  #how-we-teach .ks-classroom-support-transition-panel::before {
    width: 2.35rem;
    height: 0.16rem;
    margin-bottom: 0.42rem;
  }

  #how-we-teach .ks-classroom-support-transition-eyebrow {
    margin-bottom: 0.28rem !important;
    font-size: clamp(0.48rem, 2.1vw, 0.62rem) !important;
    letter-spacing: 0.09em;
  }

  #how-we-teach .ks-classroom-support-transition-title {
    font-size: clamp(0.9rem, 4vw, 1.16rem) !important;
    line-height: 1.42 !important;
    letter-spacing: -0.02em;
  }

  #how-we-teach .ks-classroom-support-transition-copy {
    margin-top: 0.42rem !important;
    font-size: clamp(0.62rem, 2.72vw, 0.78rem) !important;
    line-height: 1.64 !important;
  }
}

/* Hero copy hierarchy: raise the parent concern above body copy on iPad and desktop, without altering mobile composition. */
@media (min-width: 640px) {
  .ks-photo-hero .ks-hero-copy p.text-lg.sm\:text-xl.text-gray-700.font-semibold {
    margin-bottom: 0.9rem !important;
    color: #153f72 !important;
    font-size: clamp(1.15rem, 1.85vw, 1.5rem) !important;
    font-weight: 700 !important;
    letter-spacing: 0.015em;
    line-height: 1.65 !important;
  }

  .ks-photo-hero .ks-hero-copy p.text-lg.sm\:text-xl.text-gray-700.font-semibold + p {
    margin-top: 0 !important;
  }
}

/* Brand bridge from the all-in-one site to the EIKEN specialist site. */
.ks-eiken-brand-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.08rem 1rem;
  align-items: center;
  width: min(100%, 42rem);
  margin: 1.55rem auto 0;
  padding: 0.82rem 1rem 0.88rem 1.15rem;
  border: 1px solid rgba(206, 156, 38, 0.7);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #092a55 0%, #114b96 100%);
  box-shadow: 0 0.85rem 1.6rem rgba(9, 42, 85, 0.16);
  color: #fff;
  text-align: left;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-eiken-brand-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 1.05rem 1.9rem rgba(9, 42, 85, 0.25);
}

.ks-eiken-brand-link-kicker {
  grid-column: 1;
  color: #ffe290;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.ks-eiken-brand-link strong {
  grid-column: 1;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(0.94rem, 2.2vw, 1.1rem);
  line-height: 1.45;
}

.ks-eiken-brand-link-arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 231, 161, 0.65);
  border-radius: 50%;
  place-items: center;
  color: #ffe290;
  font-size: 1rem;
  font-weight: 900;
}

/* Brand portal: the general site is the gateway to specialist paths. */
#brand-portal.ks-brand-portal {
  position: relative;
  overflow: hidden;
  margin: clamp(2rem, 5vw, 4.5rem) auto;
  padding: clamp(2.75rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
  background:
    radial-gradient(circle at 10% 0%, rgba(248, 198, 80, .2), transparent 27%),
    linear-gradient(135deg, #071b38 0%, #0b2f60 56%, #114b96 100%);
  border: 1px solid rgba(248, 198, 80, .78);
  border-radius: clamp(1.2rem, 2.5vw, 2rem);
  box-shadow: 0 20px 55px rgba(6, 26, 58, .2), inset 0 0 0 5px rgba(255, 255, 255, .06);
  isolation: isolate;
}
#brand-portal.ks-brand-portal::before,
#brand-portal.ks-brand-portal::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 198, 80, .9), transparent);
  pointer-events: none;
}
#brand-portal.ks-brand-portal::before { top: .85rem; }
#brand-portal.ks-brand-portal::after { bottom: .85rem; }
.ks-brand-portal-shell { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }
.ks-brand-portal-heading { max-width: 780px; margin: 0 auto clamp(1.75rem, 4vw, 3rem); text-align: center; }
.ks-brand-portal-eyebrow {
  display: inline-block;
  margin: 0 0 .85rem;
  padding: .42rem .85rem;
  border: 1px solid rgba(248, 198, 80, .82);
  border-radius: 999px;
  color: #ffe28b;
  font-size: clamp(.67rem, 1.4vw, .83rem);
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
}
.ks-brand-portal-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.65rem, 3.9vw, 3rem);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.35;
  text-wrap: balance;
}
.ks-brand-portal-heading h2::after {
  content: "";
  display: block;
  width: clamp(4rem, 12vw, 7rem);
  height: 3px;
  margin: 1.1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e4aa32, #ffe28b, #e4aa32);
}
.ks-brand-portal-lead {
  margin: 1.25rem auto 0;
  color: #eaf3ff;
  font-size: clamp(.92rem, 1.5vw, 1.08rem);
  line-height: 1.95;
  text-wrap: pretty;
}
.ks-brand-portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.25rem); }
.ks-brand-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 255px;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(1.1rem, 2.4vw, 1.65rem);
  border: 1px solid rgba(255, 255, 255, .24);
  border-top: 4px solid #f8c650;
  border-radius: 1rem;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 12px 28px rgba(3, 15, 38, .18);
  transition: transform 180ms cubic-bezier(.23,1,.32,1), box-shadow 180ms cubic-bezier(.23,1,.32,1), background 180ms ease;
}
.ks-brand-card::after {
  content: "";
  position: absolute;
  top: -4rem;
  right: -3rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: rgba(248, 198, 80, .14);
  pointer-events: none;
}
.ks-brand-card:hover,
.ks-brand-card:focus-visible { transform: translateY(-4px); background: rgba(255, 255, 255, .17); box-shadow: 0 18px 34px rgba(3, 15, 38, .28); }
.ks-brand-card:focus-visible { outline: 3px solid #ffe28b; outline-offset: 3px; }
.ks-brand-card-kicker { position: relative; z-index: 1; color: #ffe28b; font-size: .7rem; font-weight: 800; letter-spacing: .12em; line-height: 1.4; }
.ks-brand-card-title { position: relative; z-index: 1; margin-top: .6rem; color: #fff; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 800; line-height: 1.45; text-wrap: balance; }
.ks-brand-card-copy { position: relative; z-index: 1; margin-top: .75rem; color: #eaf3ff; font-size: .92rem; line-height: 1.8; }
.ks-brand-card-action { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 1rem; color: #ffe28b; font-size: .88rem; font-weight: 800; }
.ks-brand-card-action b { font-size: 1.25rem; line-height: 1; transition: transform 180ms ease; }
.ks-brand-card:hover .ks-brand-card-action b { transform: translateX(3px); }
.ks-brand-card--eiken { background: linear-gradient(145deg, rgba(248, 198, 80, .2), rgba(255, 255, 255, .08)); }
.ks-brand-card--exam { background: linear-gradient(145deg, rgba(74, 151, 223, .2), rgba(255, 255, 255, .08)); }
.ks-brand-card--support { background: linear-gradient(145deg, rgba(67, 166, 143, .2), rgba(255, 255, 255, .08)); }
.ks-brand-portal-proof { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 1.6rem; margin-top: clamp(1.5rem, 3vw, 2.35rem); color: #dbeaff; font-size: .83rem; line-height: 1.5; text-align: center; }
.ks-brand-portal-proof span { position: relative; }
.ks-brand-portal-proof span + span::before { content: ""; position: absolute; left: -0.85rem; top: 50%; width: 1px; height: 1.1rem; transform: translateY(-50%); background: rgba(248, 198, 80, .6); }
.ks-brand-portal-proof b { color: #ffe28b; font-size: 1.02rem; }
.ks-brand-nav-link { color: #ffe28b !important; font-weight: 800 !important; }
@media (max-width: 900px) {
  .ks-brand-portal-grid { grid-template-columns: 1fr; max-width: 650px; margin-inline: auto; }
  .ks-brand-card { min-height: 0; }
}
@media (max-width: 560px) {
  #brand-portal.ks-brand-portal { margin-inline: .7rem; padding: 2.4rem .85rem; border-radius: 1.15rem; }
  .ks-brand-portal-break { display: block; }
  .ks-brand-portal-lead { font-size: .9rem; line-height: 1.85; }
  .ks-brand-card { padding: 1.05rem; }
  .ks-brand-card-copy { font-size: .88rem; line-height: 1.72; }
  .ks-brand-portal-proof { gap: .55rem .95rem; font-size: .75rem; }
  .ks-brand-portal-proof span + span::before { left: -.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ks-brand-card, .ks-brand-card-action b { transition: none; }
}


/* Brand-wide mobile typography alignment: central, readable, and phrase-aware. */
#root main > section > .container > p,
#root main > section > .container > div > p,
.ks-brand-portal-lead,
.ks-brand-card-copy,
.ks-direct-contract-lead,
.ks-comparison-intro,
.ks-stoaca-copy,
.ks-classroom-support-transition-copy,
.ks-teacher-portrait-sidecard-copy {
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center !important;
  text-wrap: pretty;
  overflow-wrap: normal;
  word-break: normal;
  line-break: strict;
}

.ks-brand-portal-lead,
.ks-direct-contract-lead,
.ks-comparison-intro,
.ks-stoaca-copy,
.ks-classroom-support-transition-copy {
  max-width: 58rem;
}

.ks-brand-card-copy,
.ks-teacher-portrait-sidecard-copy {
  text-align: center !important;
}

@media (max-width: 560px) {
  #root main > section > .container > p,
  #root main > section > .container > div > p,
  .ks-brand-portal-lead,
  .ks-brand-card-copy,
  .ks-direct-contract-lead,
  .ks-comparison-intro,
  .ks-stoaca-copy,
  .ks-classroom-support-transition-copy,
  .ks-teacher-portrait-sidecard-copy {
    max-width: none !important;
    text-align: center !important;
    text-wrap: pretty;
    overflow-wrap: normal;
    word-break: normal;
    line-break: strict;
  }

  /* Keep phrase spans together where possible; allow natural wrapping only at the edge. */
  #root .ks-phrase,
  #root .ks-semantic-group {
    display: inline-block;
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }
}


/* Root hero: preserve the core service heading as one centered line on compact phones. */
@media (max-width: 560px) {
  #root main > section:first-child h1.text-4xl {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: auto !important;
    margin-left: auto !important;
    overflow: visible !important;
    color: var(--ks-navy) !important;
    font-size: clamp(1.02rem, 5.45vw, 1.72rem) !important;
    letter-spacing: -0.075em !important;
    line-height: 1.35 !important;
    text-align: center !important;
    text-wrap: nowrap !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
  }

  #root main > section:first-child .space-y-4 {
    min-width: 0;
    text-align: center !important;
  }
}

/* Chapter dividers: reinforce the visual handoff between major portal sections. */
#root main > section[id].ks-growth-section {
  isolation: isolate;
}

#root main > section[id].ks-growth-section::after {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.34rem;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #a66b08 0%,
    #dca92f 10%,
    #ffe8a1 50%,
    #dca92f 90%,
    #a66b08 100%
  );
  box-shadow: 0 1px 0 rgba(255, 249, 219, 0.88), 0 4px 12px rgba(143, 96, 6, 0.28);
  content: "";
}

#root main > section[id].ks-growth-section > .ks-growth-container {
  position: relative;
  z-index: 2;
}

/* The topic chips follow the dark social panel as a separate editorial block. */
.ks-blog .ks-content-topics {
  position: relative;
  margin-top: 3.35rem;
  padding-top: 2rem;
}

.ks-blog .ks-content-topics::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.3rem;
  background: linear-gradient(90deg, #a66b08, #dca92f 10%, #ffe8a1 50%, #dca92f 90%, #a66b08);
  box-shadow: 0 1px 0 rgba(255, 249, 219, 0.88), 0 3px 10px rgba(143, 96, 6, 0.22);
  content: "";
}

@media (max-width: 767px) {
  #root main > section[id].ks-growth-section::after {
    height: 0.31rem;
  }

  .ks-blog .ks-content-topics {
    margin-top: 2.75rem;
    padding-top: 1.65rem;
  }

  .ks-blog .ks-content-topics::before {
    height: 0.28rem;
  }
}

/* Brand portal: a clear distinction between all-scope support and the three independent specialist brands. */
.ks-brand-portal-positioning {
  max-width: 64rem;
  margin: clamp(1.5rem, 3vw, 2.3rem) auto clamp(1.35rem, 2.6vw, 2rem);
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1rem, 3vw, 1.75rem);
  border: 1px solid rgba(255, 226, 139, .48);
  border-left: 4px solid #f8c650;
  border-radius: .9rem;
  background: linear-gradient(120deg, rgba(248, 198, 80, .13), rgba(255, 255, 255, .07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  text-align: center;
}
.ks-brand-portal-positioning-label {
  margin: 0 0 .55rem;
  color: #ffe28b;
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .13em;
  line-height: 1.45;
}
.ks-brand-portal-positioning-copy,
.ks-brand-portal-positioning-focus {
  margin: 0 auto;
  color: #f4f8ff;
  font-size: clamp(.88rem, 1.45vw, 1rem);
  line-height: 1.88;
  text-align: center;
}
.ks-brand-portal-positioning-focus {
  max-width: 58rem;
  margin-top: .72rem;
  padding-top: .72rem;
  border-top: 1px solid rgba(255, 226, 139, .32);
  color: #dbeaff;
  font-size: clamp(.84rem, 1.35vw, .96rem);
}
.ks-brand-portal-positioning-copy span,
.ks-brand-portal-positioning-focus span {
  display: inline-block;
  max-width: 100%;
}
.ks-brand-portal-positioning-focus strong {
  color: #fff0b6;
  font-weight: 800;
}
@media (max-width: 560px) {
  .ks-brand-portal-positioning {
    margin-top: 1.35rem;
    margin-bottom: 1.35rem;
    padding: 1rem .85rem;
    border-left-width: 3px;
  }
  .ks-brand-portal-positioning-label { font-size: .63rem; letter-spacing: .11em; }
  .ks-brand-portal-positioning-copy,
  .ks-brand-portal-positioning-focus { line-height: 1.8; }
}

/* Direct-partnership cards: keep the three approved mobile copy lines intact. */
@media (max-width: 560px) {
  #direct-contract .ks-value-item .ks-benefit-copy-flow {
    font-size: clamp(.75rem, 3.7vw, .95rem) !important;
    line-height: 1.85;
    text-align: center !important;
  }
  #direct-contract .ks-value-item .ks-benefit-copy-line {
    display: block;
    max-width: 100%;
    letter-spacing: -0.045em;
    text-align: center;
    white-space: nowrap;
  }
}

/* All-courses heading: three equal specialist-brand paths, placed immediately below the heading. */
.ks-course-brand-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  width: min(100%, 66rem);
  margin: 1.25rem auto 1.65rem;
}
.ks-course-brand-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .08rem .7rem;
  align-items: center;
  min-width: 0;
  padding: .82rem .86rem .88rem .95rem;
  border: 1px solid rgba(206, 156, 38, .72);
  border-radius: .9rem;
  box-shadow: 0 .75rem 1.4rem rgba(9, 42, 85, .14);
  color: #fff;
  text-align: left;
  transition: transform 180ms cubic-bezier(.23, 1, .32, 1), box-shadow 180ms cubic-bezier(.23, 1, .32, 1), filter 180ms ease;
}
.ks-course-brand-link:hover,
.ks-course-brand-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 1rem 1.8rem rgba(9, 42, 85, .25);
  filter: brightness(1.07);
}
.ks-course-brand-link:focus-visible { outline: 3px solid #ffe290; outline-offset: 3px; }
.ks-course-brand-link--eiken { background: linear-gradient(135deg, #092a55 0%, #114b96 100%); }
.ks-course-brand-link--gyakuten { background: linear-gradient(135deg, #071d42 0%, #365f9f 100%); }
.ks-course-brand-link--bansou { background: linear-gradient(135deg, #083e53 0%, #18766f 100%); }
.ks-course-brand-link-kicker {
  grid-column: 1;
  min-width: 0;
  color: #ffe290;
  font-size: .57rem;
  font-weight: 900;
  letter-spacing: .11em;
  line-height: 1.4;
  white-space: nowrap;
}
.ks-course-brand-link strong {
  grid-column: 1;
  min-width: 0;
  color: #fff;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(.88rem, 1.65vw, 1.05rem);
  line-height: 1.45;
  text-align: left;
}
.ks-course-brand-link-arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(255, 231, 161, .65);
  border-radius: 50%;
  place-items: center;
  color: #ffe290;
  font-size: .95rem;
  font-weight: 900;
}
@media (max-width: 900px) {
  .ks-course-brand-links { grid-template-columns: 1fr; width: min(100%, 42rem); }
}
@media (max-width: 560px) {
  .ks-course-brand-links { gap: .6rem; margin: 1.05rem auto 1.35rem; }
  .ks-course-brand-link { padding: .78rem .9rem .82rem; }
  .ks-course-brand-link-kicker { font-size: .58rem; }
  .ks-course-brand-link strong { font-size: clamp(.9rem, 4.25vw, 1.02rem); }
}

/* Course section: specialist paths after the description, followed by a clearly visible all-course path. */
.ks-course-specialist-intro {
  width: min(100%, 54rem);
  margin: clamp(1.55rem, 3vw, 2.2rem) auto .78rem;
  color: #173c70;
  font-size: clamp(.84rem, 1.35vw, .98rem);
  font-weight: 800;
  line-height: 1.65;
  text-align: center;
}
.ks-course-brand-links {
  margin: 0 auto clamp(1rem, 2.3vw, 1.45rem);
}
.ks-course-brand-link {
  grid-template-rows: auto auto auto;
  gap: .12rem .7rem;
}
.ks-course-brand-link-area {
  grid-column: 1;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: .18rem .5rem;
  border: 1px solid rgba(255, 231, 161, .52);
  border-radius: 999px;
  color: #fff0b6;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .045em;
  line-height: 1.35;
  white-space: nowrap;
}
.ks-course-brand-link-kicker { grid-row: 2; }
.ks-course-brand-link strong { grid-row: 3; }
.ks-course-brand-link-arrow { grid-row: 1 / span 3; }
.ks-course-general-path {
  width: min(100%, 66rem);
  margin: 0 auto clamp(1.85rem, 3.6vw, 2.7rem);
  padding: clamp(.95rem, 2.5vw, 1.25rem) clamp(1rem, 3vw, 1.6rem);
  border: 1px solid rgba(34, 78, 137, .22);
  border-left: 4px solid #d7aa42;
  border-radius: .82rem;
  background: linear-gradient(110deg, #f7fbff 0%, #fffdf7 100%);
  box-shadow: 0 .7rem 1.3rem rgba(18, 61, 113, .07);
  text-align: center;
}
.ks-course-general-path-eyebrow {
  margin: 0;
  color: #a57511;
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .13em;
  line-height: 1.4;
}
.ks-course-general-path-title {
  margin: .38rem auto 0;
  color: #102f5c;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(.98rem, 1.75vw, 1.2rem);
  font-weight: 800;
  line-height: 1.55;
}
.ks-course-general-path-copy {
  max-width: 54rem;
  margin: .45rem auto 0;
  color: #536277;
  font-size: clamp(.8rem, 1.3vw, .94rem);
  line-height: 1.78;
}
.ks-course-general-path-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .72rem;
  color: #174d8f;
  font-size: .85rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.ks-course-general-path-link:hover,
.ks-course-general-path-link:focus-visible { color: #a57511; }
@media (max-width: 560px) {
  .ks-course-specialist-intro { margin-top: 1.3rem; font-size: .82rem; }
  .ks-course-brand-link-area { font-size: .62rem; }
  .ks-course-general-path { margin-bottom: 1.45rem; padding: .95rem .82rem; }
  .ks-course-general-path-title { font-size: .98rem; }
}

/* General-course path: keep the approved three-line message intact on phones. */
@media (max-width: 560px) {
  .ks-course-general-path-title {
    font-size: clamp(.82rem, 3.6vw, .96rem);
    letter-spacing: -0.045em;
    line-height: 1.62;
  }
  .ks-course-general-path-copy {
    font-size: clamp(.76rem, 3.35vw, .9rem);
    letter-spacing: -0.035em;
    line-height: 1.82;
  }
  .ks-course-general-path-title span,
  .ks-course-general-path-copy span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
  }
}

/* All-course cards: keep the title and supporting copy aligned to the icon's text column. */
#courses button .flex.items-start > .min-w-0,
#courses button .flex.items-start > .min-w-0 h4,
#courses button .flex.items-start > .min-w-0 p {
  text-align: left !important;
}
#courses button .flex.items-start > .min-w-0 p {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

/* Requested headline alignment: keep the English label and Japanese heading centered as one unit. */
.ks-growth-heading > .ks-eyebrow,
.ks-growth-heading > h2,
.ks-social-hub > .ks-social-hub-label,
.ks-social-hub > h3 {
  text-align: center !important;
}
.ks-growth-heading > h2,
.ks-social-hub > h3 {
  margin-left: auto;
  margin-right: auto;
}
#pricing .fade-in-up.mb-10 > .bg-white > .mb-6 > .ks-card-copy-one-line {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Pricing and cancellation policy: restore high-contrast copy on coloured header bands. */
#pricing .rounded-2xl.overflow-hidden > :is([class*="bg-green-"], [class*="bg-red-"], [class*="bg-[oklch"], [class*="bg-gradient"]) :is(h1, h2, h3, h4, p, span) {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 20, 44, 0.26);
}
#pricing [class*="bg-[oklch(0.72_0.14_80)"] > p,
#pricing [class*="bg-[oklch(0.72_0.14_80)"] [class*="bg-white/20"] > p {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 20, 44, 0.3);
}

/* Cancellation headers are wrapped one level deeper than the other pricing bands. */
#pricing .rounded-2xl.overflow-hidden :is([class*="bg-green-"], [class*="bg-red-"]) :is(h1, h2, h3, h4, p, span) {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 20, 44, 0.26);
}

/* Cancellation policy is a standalone section, not part of the pricing section. */
#cancel-policy .rounded-2xl.overflow-hidden :is([class*="bg-green-"], [class*="bg-red-"]) :is(h1, h2, h3, h4, p, span) {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 20, 44, 0.26);
}

/* Comparison-route UI: give high-intent visitors a calm, visible path to the official contract guide. */
.ks-hero-comparison-wrap {
  margin-top: 0.85rem;
}

.ks-hero-comparison-cta {
  display: grid;
  width: min(100%, 32rem);
  grid-template-columns: 1fr auto;
  gap: 0.22rem 1rem;
  align-items: center;
  padding: 0.8rem 1rem 0.82rem;
  color: #102f5c !important;
  border: 1px solid rgba(188, 135, 24, 0.45);
  border-left: 4px solid #dca92f;
  border-radius: 0.75rem;
  background: linear-gradient(105deg, #fffdf7 0%, #f7ebc9 100%);
  box-shadow: 0 0.7rem 1.5rem rgba(18, 61, 113, 0.1);
  line-height: 1.35;
  text-decoration: none !important;
  transition: transform 180ms var(--ks-ease), box-shadow 180ms var(--ks-ease);
}

.ks-hero-comparison-cta:hover,
.ks-hero-comparison-cta:focus-visible {
  box-shadow: 0 1rem 2rem rgba(18, 61, 113, 0.16);
  transform: translateY(-2px);
}

.ks-hero-comparison-cta:focus-visible {
  outline: 3px solid #f8c650;
  outline-offset: 3px;
}

.ks-hero-comparison-kicker {
  grid-column: 1;
  color: #a57511;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.ks-hero-comparison-cta strong {
  grid-column: 1;
  color: #123b72;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(0.86rem, 1.7vw, 1rem);
  font-weight: 800;
}

.ks-hero-comparison-arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #123b72;
  font-size: 1.05rem;
  font-weight: 900;
}

.ks-direct-comparison-bridge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem 2rem;
  align-items: center;
  margin-top: clamp(1.4rem, 3vw, 2rem);
  padding: clamp(1.2rem, 2.8vw, 1.75rem);
  border: 1px solid rgba(248, 198, 80, 0.48);
  border-left: 4px solid #f8c650;
  border-radius: 1rem;
  background: linear-gradient(115deg, rgba(248, 198, 80, 0.17), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ks-comparison-bridge-kicker {
  margin: 0;
  color: #ffe290 !important;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.4;
}

.ks-direct-comparison-bridge h3 {
  margin: 0.38rem 0 0;
  color: #fff !important;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.08rem, 2.1vw, 1.38rem) !important;
  font-weight: 800;
  line-height: 1.55 !important;
}

.ks-direct-comparison-bridge p:not(.ks-comparison-bridge-kicker) {
  max-width: 46rem;
  margin: 0.62rem 0 0;
  color: rgba(255, 255, 255, 0.84) !important;
  font-size: 0.88rem;
  line-height: 1.85;
  text-align: left !important;
}

.ks-growth-cta--comparison {
  flex: none;
  white-space: nowrap;
}

.ks-growth-cta-row--comparison {
  gap: 0.9rem;
  flex-wrap: wrap;
}

.ks-growth-cta--outline-light {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.ks-growth-cta--outline-light:hover,
.ks-growth-cta--outline-light:focus-visible {
  color: #fff !important;
  border-color: #f8c650;
  background: rgba(255, 255, 255, 0.17);
}

nav .ks-header-comparison-link {
  color: #ffe290 !important;
  font-weight: 900 !important;
}

nav .ks-header-comparison-link::before {
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  margin-right: 0.38rem;
  border-radius: 50%;
  background: #f8c650;
  content: "";
  vertical-align: middle;
}

#pricing .ks-pricing-comparison-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.35rem;
  padding: 0.85rem 1.1rem !important;
  color: #fff !important;
  border: 1px solid rgba(248, 198, 80, 0.76) !important;
  border-radius: 0.76rem !important;
  background: linear-gradient(135deg, #082a55 0%, #174d8f 100%) !important;
  box-shadow: 0 0.75rem 1.55rem rgba(9, 42, 85, 0.2) !important;
  font-size: 0.94rem !important;
  font-weight: 900 !important;
  line-height: 1.45;
  text-decoration: none !important;
}

#pricing .ks-pricing-comparison-link:hover,
#pricing .ks-pricing-comparison-link:focus-visible {
  background: linear-gradient(135deg, #0c3970 0%, #2263ad 100%) !important;
  transform: translateY(-2px);
}

.ks-pricing-comparison-icon {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  color: #102f5c;
  border-radius: 50%;
  background: #f8c650;
  font-size: 0.9rem;
}

.ks-pricing-comparison-arrow {
  color: #ffe290;
  font-size: 1.12rem;
  line-height: 1;
}

@media (max-width: 767px) {
  .ks-hero-comparison-cta {
    width: 100%;
    padding: 0.78rem 0.85rem;
  }

  .ks-hero-comparison-cta strong {
    font-size: clamp(0.82rem, 3.8vw, 0.96rem);
  }

  .ks-direct-comparison-bridge {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.1rem 1rem;
    text-align: center;
  }

  .ks-direct-comparison-bridge p:not(.ks-comparison-bridge-kicker) {
    text-align: left !important;
  }

  .ks-direct-comparison-bridge .ks-growth-cta,
  .ks-growth-cta-row--comparison .ks-growth-cta {
    width: 100%;
    white-space: normal;
  }

  .ks-growth-cta-row--comparison {
    display: grid;
    grid-template-columns: 1fr;
  }

  #pricing .ks-pricing-comparison-link {
    width: 100%;
    font-size: 0.88rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ks-hero-comparison-cta,
  #pricing .ks-pricing-comparison-link {
    transition: none;
  }
}

/* Official course-fee policy: a restrained goldline brief makes duration multipliers easy to verify without competing with the core 60-minute price table. */
.ks-course-duration-policy {
  max-width: 56rem;
  margin: 1.4rem auto 2rem;
  padding: 1.25rem 1.35rem;
  color: #173b65;
  border: 1px solid rgba(191, 143, 36, 0.46);
  border-left: 4px solid #d6a843;
  background: linear-gradient(115deg, #fffdf6 0%, #f8eed2 100%);
  box-shadow: 0 0.75rem 1.6rem rgba(18, 54, 91, 0.09);
}

.ks-course-duration-policy__eyebrow {
  margin: 0 0 0.5rem !important;
  color: #9b7119 !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em;
}

.ks-course-duration-policy h3 {
  margin: 0 !important;
  color: #102f5c !important;
  font-size: clamp(1.05rem, 2vw, 1.3rem) !important;
  font-weight: 900 !important;
  line-height: 1.55 !important;
}

.ks-course-duration-policy > p:not(.ks-course-duration-policy__eyebrow) {
  margin: 0.7rem 0 0 !important;
  color: #31536e !important;
  font-size: 0.89rem !important;
  line-height: 1.85 !important;
}

.ks-course-duration-policy strong { color: #8d6411; }

.ks-course-duration-policy__formula {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.ks-course-duration-policy__formula span {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(16, 47, 92, 0.13);
  background: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.ks-course-duration-policy__formula b {
  color: #173b65;
  font-size: 0.95rem;
}

.ks-course-duration-policy__formula em {
  color: #785e35;
  font-size: 0.74rem;
  font-style: normal;
  line-height: 1.45;
}

.ks-course-duration-policy__note {
  color: #687985 !important;
  font-size: 0.76rem !important;
}

@media (max-width: 767px) {
  .ks-course-duration-policy {
    margin: 1rem 0 1.35rem;
    padding: 1.05rem 1rem;
  }

  .ks-course-duration-policy__formula { grid-template-columns: 1fr; }
  .ks-course-duration-policy__formula span { align-items: center; }
}
