/* ============================================================
   ピアノ教室ボーノ — 共通スタイル
   配色の基点: ピアノ鍵盤の下に敷かれた赤いフェルト
   ============================================================ */

/* ---- reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* ---- tokens: light ---------------------------------------- */
:root {
  color-scheme: light;

  --ground:       #F8F5F4;
  --surface:      #FFFFFF;
  --surface-2:    #F1EAE8;
  --ink:          #241A1B;
  --ink-2:        #4C3C3D;
  --muted:        #7A696A;
  --line:         #E4DAD8;
  --line-strong:  #CEC0BE;
  --accent:       #9C2B33;
  --accent-hover: #7E222A;
  --accent-soft:  #F6E7E5;
  --on-accent:    #FFF8F7;
  --on-accent-dim:#EBC8C4;

  --key-white:    #FCFAF9;
  --key-black:    #2B1F20;
  --key-line:     #DED2D0;

  --shadow: 0 1px 2px rgba(36,26,27,.05), 0 10px 28px -16px rgba(36,26,27,.30);

  --font-display: "Zen Old Mincho", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;

  --gutter: clamp(16px, 5vw, 40px);
  --maxw: 1080px;
  --prose: 38em;
  --radius: 10px;
}

/* ---- tokens: dark (OS preference, unless light is pinned) --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground:       #17100F;
    --surface:      #1F1716;
    --surface-2:    #291F1E;
    --ink:          #F1E9E7;
    --ink-2:        #D6C7C4;
    --muted:        #A5918E;
    --line:         #362827;
    --line-strong:  #4C3937;
    --accent:       #E0737A;
    --accent-hover: #EC9096;
    --accent-soft:  #2E1C1D;
    --on-accent:    #1A0E0F;
    --on-accent-dim:#5E2E31;
    --key-white:    #2A201F;
    --key-black:    #0D0909;
    --key-line:     #3D2E2D;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px -16px rgba(0,0,0,.7);
  }
}

/* ---- tokens: dark (explicit choice) ------------------------ */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground:       #17100F;
  --surface:      #1F1716;
  --surface-2:    #291F1E;
  --ink:          #F1E9E7;
  --ink-2:        #D6C7C4;
  --muted:        #A5918E;
  --line:         #362827;
  --line-strong:  #4C3937;
  --accent:       #E0737A;
  --accent-hover: #EC9096;
  --accent-soft:  #2E1C1D;
  --on-accent:    #1A0E0F;
  --on-accent-dim:#5E2E31;
  --key-white:    #2A201F;
  --key-black:    #0D0909;
  --key-line:     #3D2E2D;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px -16px rgba(0,0,0,.7);
}

/* ---- base -------------------------------------------------- */
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  padding-inline: var(--gutter);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  /* 日本語を文節単位で折り返す。禁則処理は厳格に */
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: break-word;
}

/* 行末に一文字だけ残るような折り返しを避ける */
p, li, figcaption, summary, dd { text-wrap: pretty; }

.wrap { max-width: var(--maxw); margin-inline: auto; }
.prose { max-width: var(--prose); }
.bleed { margin-inline: calc(-1 * var(--gutter)); }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border: 1px solid var(--line-strong); z-index: 99;
}
.skip:focus { left: var(--gutter); }

/* ---- headings ---------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--accent);
  margin: 0 0 10px;
}

.section-title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 8px;
}

.section-lead {
  color: var(--ink-2);
  margin: 0 0 clamp(24px, 3vw, 36px);
  max-width: var(--prose);
}

/* five-line stave — used twice, as a section rule */
.stave {
  height: 13px;
  border: 0;
  margin: 0;
  background: repeating-linear-gradient(
    to bottom, var(--line) 0 1px, transparent 1px 3px
  );
}

/* ---- header ------------------------------------------------ */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.0625rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  letter-spacing: .04em;
}
.brand:hover { color: var(--accent); }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a {
  font-size: .875rem; color: var(--ink-2); text-decoration: none;
  padding-block: 4px;
}
.site-nav a:hover { color: var(--accent); }

/* ---- hero -------------------------------------------------- */
.hero {
  max-width: var(--maxw); margin-inline: auto;
  padding-block: clamp(44px, 7vw, 88px) clamp(28px, 4vw, 44px);
}
.hero-title {
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  line-height: 1.3;
  letter-spacing: .02em;
  margin-bottom: 20px;
}
.hero-lead {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 36em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0; }
.chips li {
  font-size: .8125rem; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.chips li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ---- buttons ----------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-body); font-size: .9375rem; font-weight: 700;
  text-decoration: none; border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- keyboard band ----------------------------------------- */
.keyband { line-height: 0; }
.keyband svg { display: block; width: 100%; height: 72px; }

/* ---- sections ---------------------------------------------- */
.section {
  max-width: var(--maxw); margin-inline: auto;
  padding-block: clamp(48px, 7vw, 84px);
}
.section + .section { border-top: 1px solid var(--line); }

/* ---- about ------------------------------------------------- */
.pillars {
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
}
@media (min-width: 700px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.section-lead + .pillars { margin-top: 0; }
.pillar { background: var(--ground); padding: 24px 22px; }
.pillar h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.pillar p { margin: 0; font-size: .9375rem; color: var(--ink-2); }

/* ---- two ways to attend ------------------------------------ */
.ways { display: grid; gap: 18px; }
@media (min-width: 760px) { .ways { grid-template-columns: 1fr 1fr; } }
.way {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.way-fixed { border-color: var(--accent); }
.way h3 {
  font-size: 1.125rem;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.way-freq { font-family: var(--font-body); font-size: .8125rem; font-weight: 500; color: var(--muted); }
.way p { margin: 0 0 10px; font-size: .9375rem; color: var(--ink-2); }
.way p:last-child { margin-bottom: 0; }
.way strong { color: var(--ink); }
.way-for {
  display: inline-block; margin-top: 6px;
  font-size: .8125rem; font-weight: 700; color: var(--accent);
}
.ways-note {
  margin: 18px 0 0; font-size: .875rem; color: var(--muted);
}

/* ---- course cards ------------------------------------------ */
.courses { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .courses { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .courses { grid-template-columns: repeat(4, 1fr); } }

.course {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.course-target {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  color: var(--accent); margin: 0 0 6px;
}
.course-name { font-size: 1.1875rem; margin-bottom: 16px; }

.prices { margin-bottom: 14px; }
.price {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0; line-height: 1.3;
}
.price + .price { margin-top: 4px; }
.price-freq {
  font-size: .8125rem; color: var(--muted); flex: none;
  min-width: 3.6em;
}
.price-num {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.price-yen { font-size: .875rem; color: var(--ink-2); }
.price-sub .price-num { font-size: 1.1875rem; color: var(--ink-2); }

.course-meta {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: .8125rem; color: var(--muted);
}
.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; line-height: 1.7;
}
.chip-fixed { background: var(--accent-soft); color: var(--accent); }
.chip-free { background: var(--surface-2); color: var(--ink-2); }
.chip-full { background: var(--accent); color: var(--on-accent); }

.course-desc {
  margin: 0 0 16px; font-size: .875rem; line-height: 1.8; color: var(--ink-2);
}
.course-extra {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .8125rem; color: var(--muted);
}
.course-extra p { margin: 0; }
.course-extra p + p { margin-top: 8px; }
.badge {
  display: inline-block; font-weight: 700; color: var(--accent);
}
.coin {
  display: block; color: var(--ink-2); line-height: 1.7;
}
.coin b { color: var(--ink); }

/* ---- price table ------------------------------------------- */
.table-scroll { overflow-x: auto; margin-top: 34px; -webkit-overflow-scrolling: touch; }

/* 狭い画面では料金表が横にはみ出すので、その旨を伝える */
.table-hint { display: none; }
@media (max-width: 760px) {
  .table-hint {
    display: block; margin: 34px 0 10px;
    font-size: .8125rem; font-weight: 700; color: var(--accent);
  }
  .table-hint + .table-scroll { margin-top: 0; }
}

/* 狭い画面では曜日と時間を明示的に上下に分ける */
@media (max-width: 560px) {
  .slots li { display: block; }
  .slot-day { display: block; margin-bottom: 2px; }
  .slot-times { display: block; }
}
table.fee {
  border-collapse: collapse; width: 100%; min-width: 680px;
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
table.fee caption {
  text-align: left; font-family: var(--font-display); font-size: 1.0625rem;
  font-weight: 700; padding-bottom: 12px;
}
table.fee th, table.fee td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line);
}
table.fee td { white-space: nowrap; }
.level-body table.fee td:nth-child(2) { white-space: normal; }
table.fee thead th {
  font-family: var(--font-body); font-size: .8125rem; font-weight: 700;
  color: var(--muted); border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.fee th[scope="row"] { font-weight: 500; white-space: nowrap; }
table.fee .lead-price { font-weight: 700; color: var(--accent); }
table.fee .sub-row th[scope="row"] { padding-left: 28px; color: var(--ink-2); }
table.fee tbody tr:last-child th, table.fee tbody tr:last-child td { border-bottom: 0; }

.notes { margin: 18px 0 0; padding: 0; list-style: none; }
.notes li {
  font-size: .8125rem; color: var(--muted); line-height: 1.9;
  padding-left: 1.3em; text-indent: -1.3em;
}

/* ---- details / level table --------------------------------- */
details.level {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
details.level > summary {
  cursor: pointer; list-style: none;
  padding: 16px 20px;
  font-family: var(--font-display); font-weight: 700; font-size: .9375rem;
  display: flex; align-items: center; gap: 10px;
}
details.level > summary::-webkit-details-marker { display: none; }
details.level > summary::before {
  content: "＋"; color: var(--accent); font-family: var(--font-body); font-weight: 700;
}
details.level[open] > summary::before { content: "－"; }
.level-body { padding: 0 20px 20px; }

/* ---- availability ------------------------------------------ */
.slots { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.slots li {
  display: flex; gap: 10px 20px; flex-wrap: wrap; align-items: baseline;
  padding: 14px 2px; border-bottom: 1px solid var(--line);
}
.slot-day {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  flex: none; min-width: 3.5em;
}
.slot-times { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .9375rem; }
.slot-times .sep { color: var(--line-strong); padding-inline: 8px; }

/* ---- full-bleed colour bands ------------------------------- */
.band {
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}
.band-soft { background: var(--surface-2); }
.band-accent { background: var(--accent); color: var(--on-accent); }

.band-accent .eyebrow { color: var(--on-accent-dim); }
.band-accent h2, .band-accent h3 { color: var(--on-accent); }
.band-accent .contact p { color: var(--on-accent-dim); }
.band-accent .contact-alt { color: var(--on-accent-dim); }
.band-accent a { color: var(--on-accent); }
.band-accent a:hover { color: var(--on-accent); }
.band-accent .btn-primary { background: var(--on-accent); color: var(--accent); }
.band-accent .btn-primary:hover { background: var(--surface); color: var(--accent-hover); }
.band-accent .btn-ghost { border-color: var(--on-accent-dim); color: var(--on-accent); }
.band-accent .btn-ghost:hover { border-color: var(--on-accent); color: var(--on-accent); }
.band-accent .stave {
  background: repeating-linear-gradient(
    to bottom, var(--on-accent-dim) 0 1px, transparent 1px 3px
  );
}
.stave-center { max-width: 132px; margin-inline: auto; margin-bottom: 26px; }

/* ---- photographs ------------------------------------------- */
.photos {
  display: grid; gap: 14px; grid-template-columns: 1fr;
}
@media (min-width: 620px) { .photos { grid-template-columns: repeat(3, 1fr); } }

/* about — a pair of photographs, modest in scale */
.about-photos {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  max-width: 600px;
}
@media (min-width: 520px) { .about-photos { grid-template-columns: 1fr 1fr; } }
.about-photos + .pillars { margin-top: 32px; }

/* recital — two photographs, one per part */
.recital-lead {
  margin: 0 0 18px; max-width: var(--prose);
  font-size: .9375rem; color: var(--ink-2);
}
.recital-pair { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .recital-pair { grid-template-columns: 1fr 1fr; } }
.recital-pair figure { margin: 0; }
.recital-pair figcaption {
  padding-top: 10px; font-size: .8125rem; line-height: 1.7; color: var(--muted);
}
.recital-pair figcaption b {
  display: block; font-family: var(--font-display);
  font-size: .9375rem; color: var(--ink); font-weight: 700;
}

.photo { margin: 0; max-width: 100%; }
.photo-wide { aspect-ratio: 4 / 3; }
.photo-portrait { aspect-ratio: 4 / 5; }
.photo-square { aspect-ratio: 1 / 1; }
.photo-landscape { aspect-ratio: 3 / 2; }
.photo-5x4 { aspect-ratio: 5 / 4; }
.photo img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--radius);
}
/* crop anchors — keep the subject in frame when the box is a different shape */
.photo img.pos-keys  { object-position: 22% center; }
.photo img.pos-upper { object-position: center 22%; }
.photo-slot {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.band-soft .photo-slot, .teacher .photo-slot { background: var(--surface); }
.photo-slot-label {
  font-family: var(--font-display); font-weight: 700;
  font-size: .9375rem; color: var(--ink-2); line-height: 1.5;
}
.photo-slot-hint { font-size: .75rem; line-height: 1.6; }

/* ---- teacher ----------------------------------------------- */
.teacher {
  display: grid; gap: clamp(20px, 3vw, 34px);
  grid-template-columns: 1fr;
  align-items: start;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
}
@media (min-width: 760px) { .teacher { grid-template-columns: 1.15fr 1fr; } }
.teacher-name {
  font-size: 1.375rem;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.teacher-name small { font-family: var(--font-body); font-size: .8125rem; color: var(--muted); font-weight: 500; }
.teacher p { margin: 0 0 12px; color: var(--ink-2); max-width: var(--prose); font-size: .9375rem; }
.teacher p:last-child { margin-bottom: 0; }
.teacher-note {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--muted) !important;
}

/* ---- faq --------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 40px 18px 0; position: relative;
  font-weight: 700; font-size: .9375rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋"; position: absolute; right: 6px; top: 18px;
  color: var(--accent); font-weight: 700;
}
.faq details[open] summary::after { content: "－"; }
.faq .answer {
  margin: 0; padding: 0 0 20px; max-width: var(--prose);
  font-size: .9375rem; color: var(--ink-2);
}

/* ---- linked page card -------------------------------------- */
.feature-link {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 26px;
  transition: border-color .18s ease, background-color .18s ease;
}
.feature-link:hover { background: var(--accent-soft); border-color: var(--accent); }
.feature-link h3 { font-size: 1.1875rem; color: var(--ink); margin-bottom: 8px; }
.feature-link p { margin: 0; color: var(--ink-2); font-size: .9375rem; max-width: var(--prose); }
.feature-link .more { display: inline-block; margin-top: 12px; font-size: .875rem; font-weight: 700; color: var(--accent); }

/* ---- contact ----------------------------------------------- */
.contact { text-align: center; padding-block: clamp(48px, 7vw, 84px); }
.contact .section-title { margin-bottom: 12px; }
.contact p { color: var(--ink-2); max-width: 36em; margin-inline: auto; }
.contact-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-top: 26px;
}
.contact-alt { margin-top: 22px; font-size: .875rem; color: var(--muted); }

/* ---- footer ------------------------------------------------ */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 30px 40px;
}
.foot-inner {
  max-width: var(--maxw); margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  align-items: center; justify-content: space-between;
  font-size: .8125rem; color: var(--muted);
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* ---- subpage intro ----------------------------------------- */
.page-head {
  max-width: var(--maxw); margin-inline: auto;
  padding-block: clamp(40px, 6vw, 76px) clamp(20px, 3vw, 32px);
}
.page-title {
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.5rem);
  line-height: 1.35; margin-bottom: 16px;
}
.page-lead { font-size: 1.0625rem; color: var(--ink-2); max-width: 36em; margin: 0; }
.back-link { display: inline-block; font-size: .875rem; font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ---- marked list ------------------------------------------- */
.tick { list-style: none; padding: 0; margin: 0; max-width: var(--prose); }
.tick li {
  position: relative; padding: 9px 0 9px 28px;
  border-bottom: 1px solid var(--line);
  font-size: .9375rem; color: var(--ink-2);
}
.tick li:last-child { border-bottom: 0; }
.tick li::before {
  content: ""; position: absolute; left: 5px; top: 1.35em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-soft); border: 1.5px solid var(--accent);
}

/* ---- quiet callout ----------------------------------------- */
.callout {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 24px 24px;
  max-width: var(--prose);
}
.callout h3 { font-size: 1.0625rem; margin-bottom: 10px; }
.callout p { margin: 0 0 10px; font-size: .9375rem; color: var(--ink-2); }
.callout p:last-child { margin-bottom: 0; }

/* ---- motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
