/* 2026-10-31 refresh (shared by / and /en/). Loaded after refresh-20261027.css.
   - Research: the copy gets the room (wider column, larger type); one real photo from my
     high-school research slides instead of a large three-photo collage.
   - Research wall: six real research photos (.rw-grid--n6) instead of ten look-alike images.
   - Tutoring: larger copy, the two YouTube appearances as a small list, and an early button
     to the tutoring page; the teaching record is shorter (small photos beside the heading,
     the lesson steps on one line) so the film button is reached sooner.
   Copy comes from window.SITE (content.js / content.en.js). */

/* ---------- research: copy first, one smaller photo ---------- */
@media (min-width: 761px) {
  html body #research .research-stage {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) !important;
    gap: clamp(24px, 3vw, 48px) !important;
    align-items: center !important;
  }
  html body #research .research-copy { padding: clamp(24px, 2.8vw, 44px) !important; }
  /* block, so the wider column does not pull it up beside the kicker line */
  html body #research .research-question { display: block !important; width: fit-content; margin-top: 14px !important; margin-bottom: 20px !important; font-size: clamp(1.9rem, 2.7vw, 3rem) !important; }
  html body #research .research-copy .lead { font-size: clamp(1.12rem, 1.32vw, 1.34rem) !important; line-height: 1.95 !important; }
  html body #research .research-copy .research-long { margin-top: 16px !important; color: #d3e0e4; font-size: clamp(1rem, 1.08vw, 1.08rem) !important; line-height: 2 !important; }
  html body #research .research-meta dd { font-size: 1rem; }
  html body #research .research-collage--single {
    display: block !important;
    justify-self: center;
    width: 100%;
    max-width: 400px;
    height: auto !important;
    min-height: 0 !important;
  }
  html body #research .research-collage--single .rc-main {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  }
  html body #research .research-collage--single .rc-main img { width: 100% !important; height: auto !important; aspect-ratio: 536 / 578; object-fit: cover !important; }
  html body #research .research-collage--single .rc-credit {
    position: static !important;
    display: block;
    padding: 9px 12px !important;
    background: rgba(4, 9, 15, .82);
    color: #c3d0da;
    font-size: .8rem;
    line-height: 1.6;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  html body #research .research-stage { grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) !important; }
}

/* mobile entry: a single real photo instead of the three-photo collage */
@media (max-width: 760px) {
  html body .mobile-detail-entry .entry-collage--single { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 240px; }
  html body .mobile-detail-entry .entry-collage--single .entry-crab { grid-row: 1; }
  html body .mobile-detail-entry .entry-collage--single img { object-position: 50% 45% !important; }
}

/* ---------- research wall: six real photos ---------- */
html body #research-wall .rw-grid--n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(2, clamp(170px, 15vw, 250px)); }
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(2) { grid-column: 3 / 5; grid-row: 1; }
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(3) { grid-column: 5 / 7; grid-row: 1; }
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(4) { grid-column: 3 / 5; grid-row: 2; }
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(5) { grid-column: 5 / 6; grid-row: 2; }
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(6) { grid-column: 6 / 7; grid-row: 2; }
/* the crab close-up keeps the claw and the anemone in frame */
html body #research-wall .rw-grid--n6 .rw-tile:nth-child(1) img { object-position: 50% 60% !important; }
@media (max-width: 999px) {
  html body #research-wall .rw-grid--n6 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, clamp(130px, 21vw, 220px)); }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(2) { grid-column: 3 / 5; grid-row: 1; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(3) { grid-column: 3 / 5; grid-row: 2; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(4) { grid-column: 1 / 3; grid-row: 3; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(5) { grid-column: 3 / 4; grid-row: 3; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(6) { grid-column: 4 / 5; grid-row: 3; }
}
@media (max-width: 600px) {
  html body #research-wall .rw-grid--n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 132px; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(n) { grid-column: auto; grid-row: auto; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(1) { grid-column: 1 / -1; grid-row: span 2; }
  html body #research-wall .rw-grid--n6 .rw-tile:nth-child(4) { grid-column: 1 / -1; }
}

/* ---------- tutoring top: the copy first, a small video list, an early button ---------- */
@media (min-width: 761px) {
  html body #bansou .edcols {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .8fr) !important;
    gap: clamp(24px, 3vw, 48px) !important;
    align-items: start !important;
  }
  html body #bansou .bansou-copy { max-width: none !important; }
  html body #bansou .bansou-copy .lead { font-size: clamp(1.2rem, 1.6vw, 1.5rem) !important; line-height: 1.95 !important; }
  html body #bansou-area .bansou-summary { max-width: none; margin-top: 14px !important; color: #d3dde6; font-size: clamp(1rem, 1.1vw, 1.1rem) !important; line-height: 2 !important; }
  html body #bansou .bansou-points { margin: 22px 0 !important; }
  html body #bansou .bansou-media { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; align-content: start; }
  html body #bansou .bansou-media figure { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 14px; align-items: center; min-height: 0 !important; }
  html body #bansou .bansou-media img { height: auto !important; max-height: none !important; }
  html body #bansou a.bansou-video figcaption { display: block; padding-top: 0 !important; color: #c3d0da; font-size: .74rem; line-height: 1.6; letter-spacing: .08em; }
  html body #bansou a.bansou-video figcaption span { display: block; margin-top: 8px; color: #ffc46b; letter-spacing: .04em; }
}
/* tablets stack the two columns: keep the two videos side by side and small */
@media (min-width: 761px) and (max-width: 1100px) {
  html body #bansou .bansou-media { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; margin-top: 18px; }
}
html body .bansou-open {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 14px 26px;
  background: #ffc46b;
  color: #1c1205;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
  transition: background .25s ease, box-shadow .25s ease;
}
html body .bansou-open i { position: relative; display: block; width: 26px; height: 1px; background: currentColor; transition: width .35s cubic-bezier(.2, .7, .2, 1); }
html body .bansou-open i::after { content: ""; position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
html body .bansou-open:hover { background: #ffd894; }
html body .bansou-open:hover i,
html body .bansou-open:focus-visible i { width: 40px; }
html body .bansou-open:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* the early button in the mobile entry sits right under the first paragraph */
@media (max-width: 760px) {
  html body .mobile-detail-entry--tutoring .entry-cta { min-height: 92px; margin: 0 0 6px; }
}

/* ---------- tutoring record: shorter ---------- */
html body .bansou-teaching .tt-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 48px);
  align-items: center;
}
html body .bansou-teaching .tt-head__copy .tt-intro { margin: 14px 0 0; font-size: 1.02rem; }
html body .bansou-teaching .tt-head__copy .tt-quote { margin-top: 16px; }
html body .bansou-teaching .tt-photos { min-width: 0; }
html body .bansou-teaching .tt-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-inline: 0; }
html body .bansou-teaching .tt-photo { aspect-ratio: 16 / 10; }
html body .bansou-teaching .tt-photo figcaption { padding: 22px 10px 7px; font-size: .74rem; }
html body .bansou-teaching .tt-photo-note { margin-top: 8px; font-size: .74rem; }
html body .bansou-teaching .tt-record { padding: clamp(18px, 1.8vw, 26px); }
html body .bansou-teaching .tt-record__no { font-size: clamp(1.8rem, 2.4vw, 2.5rem); }
html body .bansou-teaching .tt-record__en { margin-top: 10px; }
html body .bansou-teaching .tt-flow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 24px;
  align-items: center;
  margin-top: clamp(12px, 1.4vw, 22px);
  padding: clamp(16px, 1.8vw, 24px) clamp(18px, 2.2vw, 32px);
  background: var(--rf-panel);
  border: 1px solid var(--rf-panel-line);
  border-radius: 4px;
}
html body .bansou-teaching .tt-flow .tt-sub { margin: 0; font-size: 1.15rem; white-space: nowrap; }
html body .bansou-teaching .tt-flow ol { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 0; padding: 0; list-style: none; }
html body .bansou-teaching .tt-flow__step { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: .95rem; line-height: 1.5; }
html body .bansou-teaching .tt-flow__step span { color: var(--tt); font-family: var(--rf-serif); font-size: 1.1rem; font-variant-numeric: lining-nums; }
html body .bansou-teaching .tt-flow__step + .tt-flow__step::before { content: "→"; margin-right: 6px; color: #a98959; }
html body .bansou-teaching > .vcta { margin-top: clamp(16px, 2vw, 28px); }
@media (max-width: 900px) {
  html body .bansou-teaching .tt-head,
  html body .bansou-teaching .tt-flow { grid-template-columns: minmax(0, 1fr); }
  /* once the heading spans the width, the four photos share one small row */
  html body .bansou-teaching .tt-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  html body .bansou-teaching { margin-top: 28px; }
  html body .bansou-teaching .tt-head h3 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  html body .bansou-teaching .tt-head__copy .tt-intro { font-size: .95rem; line-height: 1.9; }
  /* four small photos in one row; the captions stay in the alt text */
  html body .bansou-teaching .tt-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  html body .bansou-teaching .tt-photo { aspect-ratio: 1 / 1; }
  html body .bansou-teaching .tt-photo figcaption { display: none; }
  html body .bansou-teaching .tt-records { gap: 10px; }
  html body .bansou-teaching .tt-record { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: baseline; padding: 16px 18px; }
  html body .bansou-teaching .tt-record__no { grid-row: 1 / 4; font-size: 1.7rem; }
  html body .bansou-teaching .tt-record__en { margin: 0; font-size: .64rem; }
  html body .bansou-teaching .tt-record h4 { margin: 0; font-size: 1.05rem; }
  html body .bansou-teaching .tt-record p:last-child { font-size: .9rem; line-height: 1.8; }
  html body .bansou-teaching .tt-flow__step { font-size: .9rem; }
}

/* ---------- YouTube (2026-10-31, second pass): no empty space under the player ----------
   The list of videos used to be four 300px-tall cards (the old horizontal shelf's flex-basis,
   applied down a column), so it ran twice as long as the player and left a blank area under the
   one-line caption. On wide screens the list now ends where the caption ends: the four rows share
   that height, each a 16:9 thumbnail with the title beside it. Phones keep the short horizontal
   shelf (titles only), so they carry less but are not denser than the desktop. */
@media (min-width: 1180px) {
  html body #youtube .sns-block--youtube {
    grid-template-columns: minmax(0, 1.75fr) minmax(360px, 1fr);
    row-gap: 0;
  }
  html body #youtube .sns-block--youtube > .channel-videos {
    align-self: stretch;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0;
    overflow: visible;
  }
  html body #youtube .sns-block--youtube .channel-videos .channel-video {
    flex: 1 1 0 !important;
    min-height: 0;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    gap: 0;
    border-radius: 4px;
  }
  html body #youtube .sns-block--youtube .channel-video img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
  html body #youtube .sns-block--youtube .channel-video-copy { padding: 10px 16px; }
  html body #youtube .sns-block--youtube .channel-video-copy small { margin-bottom: 4px; }
  html body #youtube .sns-block--youtube .channel-now { padding: 14px 0 0 !important; border-bottom: 0; }
  html body #youtube .sns-block--youtube .channel-now h3 { font-size: clamp(1.1rem, 1.45vw, 1.45rem); line-height: 1.6; }
}
/* the podcast card: on wide screens the three latest episodes fill the right half, which was
   empty (phones keep the short card without the list) */
@media (min-width: 1000px) {
  html body #youtube .pod-card { align-items: start; }
  html body #youtube .pod-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas: "phase eps" "title eps" "lead eps" "link eps";
    grid-template-rows: auto auto auto 1fr;
    column-gap: clamp(24px, 3vw, 48px);
  }
  html body #youtube .pod-card__body > .story-phase { grid-area: phase; }
  html body #youtube .pod-card__body > h3 { grid-area: title; }
  html body #youtube .pod-card__body > .pod-card__lead { grid-area: lead; }
  html body #youtube .pod-card__body > .story-link { grid-area: link; align-self: end; justify-self: start; }
  html body #youtube .pod-card__eps { display: grid; grid-area: eps; gap: 6px; margin: 0; }
  html body #youtube .pod-card__eps li { padding: 8px 12px; font-size: .84rem; }
}
