.tomoe-update-button-wrap {
  display: flex;
  justify-content: center;
  margin: 2.5rem auto 0;
  padding: 0 1rem;
}

.tomoe-update-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.9rem 2rem;
  border: 1px solid var(--bamboo-deep, #36584a);
  background: var(--bamboo-deep, #36584a);
  color: var(--paper, #fffaf1);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tomoe-update-button:hover { opacity: 0.88; }
.tomoe-update-button:active { transform: scale(0.98); }
.tomoe-update-button-secondary {
  background: transparent;
  color: var(--bamboo-deep, #36584a);
}

.tomoe-update-button-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem auto 0;
  padding: 0 1rem;
}

.tomoe-header-brand-only { gap: 0 !important; }
.tomoe-header-subtitle { font-size: 12px !important; }
.tomoe-footer-brand-only { gap: 0 !important; margin-bottom: 0 !important; }
.tomoe-footer-paper { background: var(--paper) !important; }

/* フッターの猫：画像の四角い端を水彩のように自然に溶かす */
.tomoe-footer-cat {
  display: block;
  width: clamp(6.5rem, 8vw, 8rem) !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  opacity: 0.94 !important;
  mix-blend-mode: multiply;
  filter: saturate(0.92) contrast(0.98);
  -webkit-mask-image: radial-gradient(ellipse 74% 72% at 50% 50%, #000 50%, rgba(0, 0, 0, 0.9) 65%, rgba(0, 0, 0, 0.35) 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 74% 72% at 50% 50%, #000 50%, rgba(0, 0, 0, 0.9) 65%, rgba(0, 0, 0, 0.35) 82%, transparent 100%);
}

[data-loc="client/src/pages/Access.tsx:78"],
.tomoe-hidden-access-sister-school {
  display: none !important;
}

.tomoe-teaching-philosophy {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25));
  text-align: left;
}

.tomoe-card-heading {
  margin-bottom: 0.8rem;
  color: var(--ink, #292821);
  font-family: var(--font-serif, serif);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.tomoe-card-body {
  max-width: 42em;
  color: var(--muted-foreground, #6f6a60);
  font-size: clamp(0.84rem, 0.9vw, 0.92rem);
  line-height: 1.95;
  letter-spacing: 0.025em;
}

/* 肩書きを外した講師カード：写真と氏名の間を黄金比に近い余白で整える */
.tomoe-teacher-name-without-title {
  margin-top: 1.75rem !important;
}

/* 講師の歩み：年号と本文の余白を全項目で統一する */
.tomoe-career-timeline {
  display: grid;
  gap: 0 !important;
  margin-top: 2.25rem !important;
}

.tomoe-career-row {
  display: grid !important;
  grid-template-columns: minmax(6.75rem, 0.618fr) minmax(0, 1.618fr) !important;
  align-items: start;
  gap: clamp(1rem, 2.4vw, 1.75rem) !important;
  margin: 0 !important;
  padding: 1.35rem 0 !important;
}

.tomoe-career-year,
.tomoe-career-year a,
.tomoe-career-year a[x-apple-data-detectors],
.tomoe-career-year a[href^="x-apple-data-detectors:"] {
  color: var(--bamboo-deep, #36584a) !important;
  text-decoration: none !important;
  -webkit-text-decoration-line: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.tomoe-career-description {
  min-width: 0;
  max-width: 42em;
  line-height: 1.9 !important;
  text-align: left !important;
  text-align-last: left !important;
  word-spacing: 0 !important;
}

.tomoe-timeline-cat-row {
  display: grid;
  grid-template-columns: minmax(0, 1.618fr) minmax(110px, 1fr);
  align-items: center;
  gap: 1.5rem;
}

.tomoe-timeline-cat {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* 全ページ共通：スマートフォンを最優先にした読みやすさ */
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

.tomoe-page-root,
.tomoe-mobile-section,
.tomoe-mobile-section * {
  min-width: 0;
}

.tomoe-mobile-section h1,
.tomoe-mobile-section h2,
.tomoe-mobile-section h3,
.tomoe-mobile-section p,
.tomoe-mobile-section li,
.tomoe-mobile-section dt,
.tomoe-mobile-section dd {
  overflow-wrap: anywhere;
}

.tomoe-mobile-section h1,
.tomoe-mobile-section h2,
.tomoe-mobile-section h3 {
  text-wrap: balance;
}

.tomoe-mobile-section p,
.tomoe-mobile-section li,
.tomoe-mobile-section dd {
  text-wrap: pretty;
}

.tomoe-skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bamboo-deep, #36584a);
  color: var(--paper, #fffaf1);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold-deep, #9a7c43);
  outline-offset: 3px;
}

/* レッスンカード：説明欄と料金欄を黄金比（約1.618：1）で配置 */
.tomoe-lesson-price-panel {
  width: 100% !important;
  min-width: 0;
  text-align: center !important;
}

.tomoe-lesson-fee-note,
.tomoe-lesson-duration,
.tomoe-lesson-extra {
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: normal;
}

.tomoe-lesson-fee-note {
  line-height: 1.75 !important;
}

.tomoe-lesson-duration {
  margin-top: 1rem !important;
  padding-top: 1rem;
  border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25));
  font-size: 0.82rem !important;
  line-height: 1.9 !important;
}

.tomoe-lesson-extra {
  margin-top: 0.75rem !important;
  font-size: 0.72rem !important;
  line-height: 1.75 !important;
}

/* トップページの理念欄：上下2段にし、各段の中を黄金比で整える */
.tomoe-two-card-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid var(--border, rgba(100, 90, 75, 0.25));
}

.tomoe-two-card-grid > * {
  display: grid !important;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.618fr) !important;
  align-items: start;
  gap: clamp(1.75rem, 3.5vw, 4rem) !important;
  padding: clamp(2rem, 3.5vw, 3.5rem) !important;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.22);
}

.tomoe-two-card-grid > * + * {
  border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25)) !important;
}

.tomoe-two-card-grid > * h3,
.tomoe-two-card-grid > * p {
  margin: 0 !important;
}

.tomoe-two-card-grid > * h3 {
  line-height: 1.65 !important;
}

.tomoe-two-card-grid > * p {
  max-width: 52em;
  line-height: 2.05 !important;
}

@media (min-width: 768px) {
  .tomoe-two-card-grid {
    width: min(100%, 68rem);
    margin: clamp(2.25rem, 3.5vw, 3rem) auto 0 !important;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .tomoe-two-card-grid > * {
    align-items: start;
    gap: clamp(2.5rem, 5vw, 4rem) !important;
    padding: clamp(2.25rem, 3.5vw, 2.75rem) 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25)) !important;
    background: transparent;
  }

  .tomoe-two-card-grid > *:last-child {
    border-bottom: 1px solid var(--border, rgba(100, 90, 75, 0.25)) !important;
  }

  .tomoe-two-card-grid > * h3 {
    font-size: clamp(1.05rem, 1.35vw, 1.3rem) !important;
    line-height: 1.6 !important;
  }

  .tomoe-two-card-grid > * p {
    font-size: clamp(0.9rem, 1vw, 0.98rem) !important;
    max-width: 44em;
    line-height: 1.9 !important;
  }

  .tomoe-lesson-card {
    grid-template-columns: minmax(0, 1.618fr) minmax(15rem, 1fr) !important;
    align-items: center;
  }
  .tomoe-lesson-price-panel {
    padding-left: 2.5rem !important;
  }
}

@media (min-width: 1024px) {
  .tomoe-teacher-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr) !important; }
  .tomoe-access-grid,
  .tomoe-contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr) !important; }
}

@media (min-width: 768px) {
  .tomoe-footer-columns { grid-template-columns: minmax(0, 1.236fr) repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 640px) {
  .tomoe-update-button { width: 100%; max-width: 22rem; }
  .tomoe-timeline-cat-row { grid-template-columns: 1fr; }
  .tomoe-timeline-cat { width: 45%; min-width: 120px; margin: 0 auto; }
  .tomoe-update-button-pair { flex-direction: column; align-items: stretch; }
  .tomoe-update-button-pair .tomoe-update-button { width: 100%; }
  .tomoe-footer-cat { width: min(38.2vw, 7rem) !important; margin-inline: auto; }
}

@media (max-width: 767px) {
  :root {
    --tomoe-mobile-gutter: clamp(1.1rem, 5vw, 1.5rem);
    --tomoe-mobile-section: clamp(3.5rem, 15vw, 4.75rem);
  }

  .container {
    padding-left: var(--tomoe-mobile-gutter) !important;
    padding-right: var(--tomoe-mobile-gutter) !important;
  }

  .tomoe-mobile-section:not(.tomoe-page-hero):not(.tomoe-home-hero) {
    padding-top: var(--tomoe-mobile-section) !important;
    padding-bottom: var(--tomoe-mobile-section) !important;
  }

  .tomoe-page-hero {
    min-height: auto;
    display: flex;
    align-items: center;
    padding-top: 7.25rem !important;
    padding-bottom: 3.75rem !important;
  }

  .tomoe-page-hero [data-loc="client/src/components/Layout.tsx:69"] {
    width: 100%;
  }

  .tomoe-page-hero h1 {
    max-width: 12em;
    margin-inline: auto;
    font-size: clamp(1.9rem, 8.4vw, 2.45rem) !important;
    line-height: 1.45 !important;
    letter-spacing: 0.08em !important;
  }

  .tomoe-page-hero [data-loc="client/src/components/Layout.tsx:70"] {
    letter-spacing: 0.22em !important;
    line-height: 1.7;
  }

  .tomoe-page-hero [data-loc="client/src/components/Layout.tsx:75"] {
    max-width: 32em;
    margin-top: 1.5rem !important;
    font-size: 0.94rem !important;
    line-height: 1.9 !important;
  }

  .tomoe-home-hero {
    min-height: 100svh !important;
  }

  [data-loc="client/src/pages/Home.tsx:39"] {
    padding-top: 8rem !important;
  }

  [data-loc="client/src/pages/Home.tsx:41"] {
    max-width: 18em;
    margin-bottom: 1.25rem !important;
    line-height: 1.8;
    letter-spacing: 0.18em !important;
  }

  [data-loc="client/src/pages/Home.tsx:44"] {
    max-width: 11em;
    font-size: clamp(1.75rem, 7.8vw, 2.2rem) !important;
    line-height: 1.55 !important;
  }

  [data-loc="client/src/pages/Home.tsx:48"] {
    max-width: 31em;
    font-size: 0.94rem !important;
    line-height: 1.95 !important;
  }

  [data-loc="client/src/pages/Home.tsx:53"] {
    gap: 0.75rem !important;
  }

  [data-loc="client/src/pages/Home.tsx:53"] a,
  .tomoe-update-button,
  .tomoe-update-button-pair a {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.9rem 1.1rem !important;
    line-height: 1.5;
    text-align: center;
  }

  [data-loc="client/src/pages/Home.tsx:79"] {
    white-space: normal !important;
    font-size: clamp(1.4rem, 6.3vw, 1.85rem) !important;
    line-height: 1.6 !important;
  }

  [data-loc="client/src/pages/Home.tsx:84"] {
    margin-top: 1.75rem !important;
  }

  .tomoe-two-card-grid {
    gap: 0 !important;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .tomoe-two-card-grid > * {
    grid-template-columns: 1fr !important;
    gap: 0.7rem !important;
    padding: 1.35rem 0.15rem !important;
    border: 0 !important;
    border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25)) !important;
    background: transparent;
  }

  .tomoe-two-card-grid > *:last-child {
    border-bottom: 1px solid var(--border, rgba(100, 90, 75, 0.25)) !important;
  }

  .tomoe-two-card-grid > * h3 {
    font-size: clamp(1rem, 4.3vw, 1.12rem) !important;
    line-height: 1.5 !important;
    letter-spacing: 0.025em !important;
    text-align: left !important;
    text-align-last: left !important;
    text-wrap: wrap !important;
    word-spacing: 0 !important;
  }

  .tomoe-two-card-grid > * p {
    width: 100%;
    max-width: none;
    font-size: clamp(0.84rem, 3.55vw, 0.9rem) !important;
    line-height: 1.8 !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    text-align: left !important;
    text-align-last: left !important;
    text-wrap: wrap !important;
    white-space: normal !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  #tomoe-home-about-button {
    margin-top: 2rem;
  }

  .tomoe-teaching-philosophy {
    margin-top: 1.35rem;
    padding-top: 1.25rem;
  }

  .tomoe-teaching-philosophy .tomoe-card-heading {
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .tomoe-teaching-philosophy .tomoe-card-body {
    max-width: 100%;
    font-size: clamp(0.85rem, 3.6vw, 0.92rem);
    line-height: 1.82;
    letter-spacing: 0.01em;
    overflow-wrap: normal;
    word-break: normal;
    text-align: left !important;
    text-align-last: left !important;
    text-wrap: wrap !important;
    word-spacing: 0 !important;
  }

  /* 小さな画面では年号を上・説明を下に置き、本文を画面いっぱい使う */
  .tomoe-career-timeline {
    margin-top: 1.65rem !important;
  }

  .tomoe-career-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.55rem !important;
    padding: 1.35rem 0 1.55rem !important;
    border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25));
  }

  .tomoe-career-row:last-child {
    border-bottom: 1px solid var(--border, rgba(100, 90, 75, 0.25));
  }

  .tomoe-career-year {
    font-size: clamp(0.99rem, 4.3vw, 1.12rem) !important;
    line-height: 1.4 !important;
    letter-spacing: 0.035em !important;
  }

  .tomoe-career-description {
    width: 100%;
    max-width: none;
    padding-left: 0 !important;
    border-left: 0 !important;
    font-size: clamp(0.84rem, 3.55vw, 0.92rem) !important;
    line-height: 1.82 !important;
    letter-spacing: 0.01em !important;
    text-wrap: wrap !important;
    white-space: normal !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  [data-loc="client/src/pages/Teachers.tsx:43"],
  [data-loc="client/src/pages/Lessons.tsx:96"] {
    padding: 1.5rem !important;
  }

  [data-loc="client/src/pages/Home.tsx:136"] {
    min-height: auto;
    display: flex;
    align-items: center;
    padding-top: 4.75rem !important;
    padding-bottom: 4.75rem !important;
  }

  .tomoe-timeline-cat-row {
    gap: 1.25rem;
  }

  .tomoe-timeline-cat-copy {
    order: 2;
  }

  .tomoe-timeline-cat {
    order: 1;
    width: 38.2%;
  }

  .tomoe-teacher-grid,
  .tomoe-access-grid,
  .tomoe-contact-grid,
  .tomoe-lesson-card {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .tomoe-lesson-price-panel {
    padding: 1.5rem 0 0 !important;
  }

  [data-loc="client/src/pages/Access.tsx:27"] {
    aspect-ratio: 1.618 / 1 !important;
  }

  [data-loc="client/src/pages/Faq.tsx:64"] {
    min-height: 3.5rem;
    padding-block: 1.25rem !important;
    font-size: 1rem !important;
    line-height: 1.75 !important;
  }

  [data-loc="client/src/pages/Faq.tsx:67"] {
    padding-bottom: 1.5rem !important;
    font-size: 0.94rem !important;
    line-height: 1.95 !important;
  }

  [data-loc="client/src/pages/Privacy.tsx:56"] {
    padding-left: 1.15rem !important;
  }

  .google-form-embed {
    width: calc(100% + 0.5rem);
    margin-left: -0.25rem;
  }

  .tomoe-footer-paper {
    margin-top: 4rem !important;
    padding-top: 3.5rem !important;
  }

  .tomoe-lesson-card {
    grid-template-columns: 1fr !important;
  }
  .tomoe-lesson-price-panel {
    padding-top: 1.5rem;
    padding-left: 0 !important;
    border-top: 1px solid var(--border, rgba(100, 90, 75, 0.25));
    border-left: 0 !important;
  }
}

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