/* Photo-led hero experience: dedicated to the top-page online lesson visual. */

:root {
  --ks-hero-navy: #0b1f3a;
  --ks-hero-blue: #164f96;
  --ks-hero-amber: #e6a619;
}

.ks-photo-hero {
  isolation: isolate;
}

.ks-photo-hero .ks-hero-visual,
.ks-photo-hero .ks-hero-copy {
  position: relative;
}

.ks-hero-nowrap {
  white-space: nowrap;
}

@keyframes ks-hero-image-reveal {
  from {
    opacity: 0;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ks-hero-slide-up {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ks-hero-slide-right {
  from {
    opacity: 0;
    transform: translate3d(-26px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 900px) {
  .ks-photo-hero {
    background: #f7f9fc !important;
  }

  .ks-photo-hero > div:first-child {
    max-width: none !important;
    padding: 0 0 2.25rem !important;
  }

  .ks-photo-hero > div:first-child > .grid {
    display: block !important;
  }

  .ks-photo-hero .ks-hero-visual {
    position: relative !important;
    inset: auto !important;
    z-index: 1;
    display: block !important;
    width: 100%;
    height: clamp(21rem, 52svh, 31rem);
    overflow: hidden;
  }

  .ks-photo-hero .ks-hero-visual > div,
  .ks-photo-hero .ks-hero-visual img {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }

  .ks-photo-hero .ks-hero-visual::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(5, 20, 39, 0.04) 36%,
      rgba(5, 20, 39, 0.2) 67%,
      rgba(5, 20, 39, 0.62) 100%
    );
  }

  .ks-photo-hero .ks-hero-visual img {
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: cover !important;
    object-position: 51% 36%;
  }

  .ks-photo-hero .ks-hero-copy {
    z-index: 2;
    width: calc(100% - 1.5rem);
    margin: 0.85rem auto 0 !important;
    padding: 1.75rem 1.25rem 1.25rem !important;
    border: 1px solid rgba(218, 226, 239, 0.95);
    border-radius: 1.45rem 1.45rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1.4rem 3.3rem rgba(10, 29, 57, 0.17);
    backdrop-filter: blur(10px);
  }

  .ks-photo-hero .ks-hero-copy > div:first-child {
    margin-bottom: 1.15rem !important;
  }

  .ks-photo-hero .ks-hero-copy h1 {
    max-width: 14ch;
    margin: 0 !important;
    color: var(--ks-hero-navy) !important;
    font-size: clamp(2rem, 8.3vw, 2.7rem) !important;
    line-height: 1.22 !important;
    letter-spacing: 0.015em !important;
  }

  .ks-photo-hero .ks-hero-copy h1::after {
    display: block;
    width: 3rem;
    height: 0.24rem;
    margin-top: 1rem;
    content: "";
    border-radius: 999px;
    background: linear-gradient(90deg, #f4b31c, #df8b00);
  }

  .ks-photo-hero .ks-hero-copy p {
    color: #40516a !important;
    font-size: 0.955rem !important;
    line-height: 1.9 !important;
  }

  .ks-photo-hero .ks-hero-copy p:first-of-type {
    margin-top: 1rem !important;
    color: #173f73 !important;
    font-weight: 700 !important;
  }

  .ks-photo-hero .ks-hero-copy [class*="grid"] {
    gap: 0.68rem !important;
    margin-top: 1.3rem !important;
  }

  .ks-photo-hero .ks-hero-copy [class*="grid"] > div {
    min-height: 5.7rem;
    padding: 0.9rem 0.82rem !important;
    border: 1px solid #dfe7f1 !important;
    border-left: 0.24rem solid #e89a10 !important;
    border-radius: 0.8rem !important;
    background: #fff !important;
    box-shadow: 0 0.45rem 1rem rgba(16, 49, 88, 0.07) !important;
  }

  .ks-photo-hero .ks-hero-copy [class*="grid"] strong,
  .ks-photo-hero .ks-hero-copy [class*="grid"] .font-bold {
    color: #1255c5 !important;
  }

  .ks-photo-hero .ks-hero-copy > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.7rem !important;
    margin-top: 1.25rem !important;
  }

  .ks-photo-hero .ks-hero-copy > div:last-child a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 3.35rem;
    border-radius: 0.78rem !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-visual {
    animation: ks-hero-image-reveal 0.75s cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-copy > div:first-child {
    animation: ks-hero-slide-up 0.6s 0.18s cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-copy [class*="grid"] {
    animation: ks-hero-slide-up 0.6s 0.34s cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-copy > div:last-child {
    animation: ks-hero-slide-up 0.6s 0.46s cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }
}

@media (min-width: 901px) {
  .ks-photo-hero > div:first-child {
    max-width: 80rem !important;
    padding-top: clamp(4.5rem, 8vw, 7.5rem) !important;
    padding-bottom: clamp(4.5rem, 8vw, 7.5rem) !important;
  }

  .ks-photo-hero .ks-hero-visual {
    align-self: start;
  }

  .ks-photo-hero .ks-hero-visual img {
    aspect-ratio: 5 / 6;
    object-fit: cover;
    object-position: 52% center;
    border: 0.75rem solid #fff;
    box-shadow: 0 1.6rem 4rem rgba(11, 31, 58, 0.16);
  }

  .ks-photo-hero .ks-hero-copy h1 {
    max-width: 13ch;
    font-size: clamp(2.8rem, 4vw, 4.35rem) !important;
    line-height: 1.2 !important;
    letter-spacing: 0.01em;
  }

  .ks-photo-hero .ks-hero-copy h1::after {
    display: block;
    width: 3.5rem;
    height: 0.28rem;
    margin-top: 1.3rem;
    content: "";
    border-radius: 999px;
    background: linear-gradient(90deg, #f4b31c, #df8b00);
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-visual {
    animation: ks-hero-image-reveal 0.8s cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-copy > div:first-child {
    animation: ks-hero-slide-right 0.65s 0.16s cubic-bezier(0.2, 0.75, 0.3, 1)
      both;
  }

  .ks-photo-hero.ks-hero-mounted .ks-hero-copy [class*="grid"],
  .ks-photo-hero.ks-hero-mounted .ks-hero-copy > div:last-child {
    animation: ks-hero-slide-up 0.65s 0.34s cubic-bezier(0.2, 0.75, 0.3, 1) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ks-photo-hero *,
  .ks-photo-hero *::before,
  .ks-photo-hero *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Final mobile hierarchy: keep the photo and the content panel fully separate. */
@media (max-width: 900px) {
  .ks-photo-hero .ks-hero-visual {
    margin: 0 !important;
    transform: none !important;
  }

  .ks-photo-hero .ks-hero-copy {
    position: relative !important;
    z-index: auto !important;
    margin: 1rem auto 0 !important;
    transform: none !important;
  }

  .ks-photo-hero .ks-hero-copy h1 {
    max-width: none;
    color: var(--ks-hero-navy) !important;
    font-family: "Noto Serif JP", serif;
    font-size: clamp(1.95rem, 8vw, 2.35rem) !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
    letter-spacing: 0.01em !important;
  }

  .ks-photo-hero .ks-hero-copy h1::after {
    display: none;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary {
    margin: 1rem 0 0 !important;
    color: #1d4f91 !important;
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(1.08rem, 4.8vw, 1.28rem) !important;
    font-weight: 700 !important;
    line-height: 1.72 !important;
    letter-spacing: 0.015em !important;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary::after {
    display: block;
    width: 3rem;
    height: 0.24rem;
    margin-top: 0.9rem;
    content: "";
    border-radius: 999px;
    background: linear-gradient(90deg, #f4b31c, #df8b00);
  }
}

@media (min-width: 901px) {
  .ks-photo-hero .ks-hero-copy h1::after {
    display: none;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary {
    max-width: 25ch;
    margin: 1.35rem 0 0 !important;
    color: #1d4f91 !important;
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem) !important;
    font-weight: 700 !important;
    line-height: 1.65 !important;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary::after {
    display: block;
    width: 3.5rem;
    height: 0.28rem;
    margin-top: 1.15rem;
    content: "";
    border-radius: 999px;
    background: linear-gradient(90deg, #f4b31c, #df8b00);
  }
}

/* Compact mobile keyword line and a centered supporting statement. */
@media (max-width: 900px) {
  .ks-photo-hero .ks-hero-copy h1 {
    white-space: nowrap;
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(1.05rem, 4.75vw, 1.24rem) !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary {
    max-width: 20ch;
    margin: 1.2rem auto 0 !important;
    text-align: center;
    font-size: clamp(1.14rem, 5vw, 1.28rem) !important;
    line-height: 1.7 !important;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary::after {
    margin: 0.95rem auto 0;
  }
}

/* Keep the four service keywords on one line and center the supporting statement on larger screens too. */
@media (min-width: 901px) {
  .ks-photo-hero .ks-hero-copy h1 {
    white-space: nowrap;
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(1.35rem, 2vw, 1.85rem) !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary {
    margin: 1.35rem auto 0 !important;
    text-align: center;
  }

  .ks-photo-hero .ks-hero-copy .ks-hero-secondary::after {
    margin: 1.15rem auto 0;
  }
}

/* Premium achievement cards and the largest safe single-line keyword heading. */
@media (max-width: 900px) {
  .ks-photo-hero .ks-hero-copy h1 {
    font-size: clamp(1.22rem, 5.25vw, 1.38rem) !important;
    letter-spacing: -0.02em !important;
  }
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 {
  gap: 0.85rem !important;
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div {
  position: relative !important;
  min-height: 8.6rem;
  padding: 1.2rem 0.95rem 1.05rem !important;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(185, 139, 54, 0.38) !important;
  border-radius: 1.2rem !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 244, 235, 0.94)) !important;
  box-shadow:
    0 0.75rem 1.65rem rgba(17, 42, 79, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.3rem;
  content: "";
  border-radius: 1.2rem 0 0 1.2rem;
  background: linear-gradient(180deg, #d3ad61 0%, #a97825 48%, #e2c179 100%);
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div::after {
  position: absolute;
  top: -2.75rem;
  right: -2.75rem;
  z-index: -1;
  width: 7.2rem;
  height: 7.2rem;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 180, 110, 0.2), transparent 68%);
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div:hover {
  transform: translateY(-0.2rem);
  box-shadow:
    0 1rem 2rem rgba(17, 42, 79, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > .pl-2 {
  position: relative;
  z-index: 1;
  padding-left: 0.35rem !important;
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > .pl-2 > div:first-child {
  color: #113e7c !important;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.55rem, 6.5vw, 2.15rem) !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.055em !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > .pl-2 > div:last-child {
  margin-top: 0.48rem !important;
  color: #74613e !important;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.06em !important;
}

@media (min-width: 901px) {
  .ks-photo-hero .ks-hero-copy h1 {
    font-size: clamp(1.7rem, 2.35vw, 2.12rem) !important;
    letter-spacing: -0.015em !important;
  }

  .ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div {
    min-height: 9.6rem;
    padding: 1.45rem 1.25rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div {
    transition: none !important;
  }
}

/* Final mobile scale: fill the keyword line while preserving a single line on narrow screens. */
@media (max-width: 900px) {
  .ks-photo-hero .ks-hero-copy h1 {
    font-size: clamp(1.05rem, 5.9vw, 1.48rem) !important;
    letter-spacing: -0.03em !important;
  }

  .ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div {
    min-height: 8rem;
    padding: 1.05rem 0.78rem 0.9rem !important;
  }

  .ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > .pl-2 > div:first-child {
    white-space: nowrap;
    font-size: clamp(1.18rem, 5.7vw, 1.5rem) !important;
    letter-spacing: -0.065em !important;
  }
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div::before {
  width: 0.28rem;
  background: linear-gradient(180deg, #e1c784 0%, #a47829 50%, #d6b563 100%);
}

.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div {
  border-color: rgba(173, 135, 55, 0.42) !important;
  background: linear-gradient(145deg, #fffefa 0%, #f5efe0 100%) !important;
  box-shadow: 0 0.85rem 1.8rem rgba(17, 42, 79, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

/* Keep the numeric proof points compact, single-line, and finished in gold rather than bright orange. */
.ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > div:first-child:not(.pl-2) {
  display: none !important;
}

@media (max-width: 900px) {
  .ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > .pl-2 {
    white-space: nowrap;
  }

  .ks-photo-hero .ks-hero-copy .grid.grid-cols-2.sm\:grid-cols-4.gap-3 > div > .pl-2 > [class*="text-3xl"] {
    white-space: nowrap !important;
    word-break: keep-all !important;
    font-size: clamp(1.1rem, 5.4vw, 1.4rem) !important;
    letter-spacing: -0.07em !important;
  }
}

/* Actual hero proof grid: two refined cards per row on mobile. */
.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.85rem !important;
  padding-top: 0.45rem !important;
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div {
  position: relative !important;
  min-width: 0;
  min-height: 8.1rem;
  padding: 1.05rem 0.8rem 0.9rem !important;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(173, 135, 55, 0.44) !important;
  border-radius: 1.18rem !important;
  background: linear-gradient(145deg, #fffefa 0%, #f6efdf 100%) !important;
  box-shadow: 0 0.82rem 1.8rem rgba(17, 42, 79, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > div:first-child:not(.pl-2) {
  display: none !important;
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  content: "";
  border-radius: 1.18rem 0 0 1.18rem;
  background: linear-gradient(180deg, #e1c784 0%, #a47829 50%, #d6b563 100%);
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div::after {
  position: absolute;
  top: -2.65rem;
  right: -2.65rem;
  z-index: -1;
  width: 7rem;
  height: 7rem;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 180, 110, 0.2), transparent 68%);
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 {
  position: relative;
  z-index: 1;
  padding-left: 0.4rem !important;
  white-space: nowrap;
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 > div:first-child {
  color: #113e7c !important;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.1rem, 5.4vw, 1.42rem) !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.07em !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 > div:last-child {
  margin-top: 0.45rem !important;
  color: #74613e !important;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.055em !important;
}

@media (min-width: 901px) {
  .ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div {
    min-height: 9rem;
    padding: 1.3rem 1.05rem !important;
  }

  .ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 > div:first-child {
    font-size: clamp(1.35rem, 2.15vw, 1.8rem) !important;
  }
}

/* Mobile header: a prominent one-line tutor name with the service detail restored on a second line. */
@media (max-width: 767px) {
  .ks-header-brand-copy {
    gap: 0.12rem !important;
    padding: 0.1rem 0 !important;
  }

  .ks-header-name {
    display: inline-block;
    font-size: clamp(1.06rem, 5.3vw, 1.28rem) !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: 0.035em !important;
  }

  .ks-header-tagline {
    display: block !important;
    max-width: calc(100vw - 7.1rem);
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: clamp(0.43rem, 2.05vw, 0.52rem) !important;
    font-weight: 600;
    line-height: 1.28 !important;
    letter-spacing: 0.025em !important;
    text-overflow: clip;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .ks-header-name {
    font-size: clamp(1.22rem, 6.4vw, 1.56rem) !important;
    letter-spacing: 0.045em !important;
  }
}

@media (max-width: 767px) {
  .ks-header-name-suffix {
    display: none;
  }
}

/* Mobile header: two full-width brand lines, each sized by measured available space. */
@media (max-width: 767px) {
  .ks-mobile-header-row {
    position: relative !important;
    align-items: flex-start !important;
    min-height: 4.6rem !important;
    padding-top: 0.38rem !important;
    padding-bottom: 1.65rem !important;
  }

  .ks-header-brand-copy {
    position: static !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding-top: 0.06rem !important;
  }

  .ks-header-brand-copy > div:first-child {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .ks-header-name {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    color: #fff !important;
    font-family: "Noto Serif JP", serif !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: 0.02em !important;
    text-align: left !important;
  }

  .ks-header-name-suffix {
    display: inline !important;
  }

  .ks-header-tagline {
    display: block !important;
    position: absolute !important;
    right: 0 !important;
    bottom: 0.36rem !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-family: "Noto Sans JP", sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
  }
}

/* Keep the homepage title as the dominant first row on compact headers. */
@media (max-width: 767px) {
  .ks-mobile-header-row > a {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .ks-mobile-header-row > a .ks-header-name {
    text-rendering: optimizeLegibility;
  }
}

/* Treat the full site name as a single fitted title on mobile. */
@media (max-width: 767px) {
  .ks-mobile-header-row > a > div:first-child {
    display: none !important;
  }

  .ks-header-name::before {
    content: "プロ家庭教師　";
    font-family: "Noto Serif JP", serif;
    font-weight: 900;
  }
}


/* Hero proof cards: aligned navy figures and deliberate gold label line breaks. */
.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 {
  display: flex !important;
  min-height: 6.2rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 0 !important;
  text-align: center !important;
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 > div:first-child {
  width: 100%;
  text-align: center !important;
  font-variant-numeric: lining-nums tabular-nums;
}

.ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 > div:last-child {
  display: block !important;
  width: 100%;
  margin-top: 0.38rem !important;
  color: #8b6b2d !important;
  text-align: center !important;
  line-height: 1.22 !important;
  letter-spacing: 0.035em !important;
}


@media (max-width: 420px) {
  .ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div {
    min-height: 8.45rem;
  }

  .ks-photo-hero .ks-hero-copy > .grid.grid-cols-1.sm\:grid-cols-2.gap-4.pt-4 > div > .pl-2 {
    min-height: 6.55rem;
  }
}
