/* Teaching card and reader design approved by Benito, 16 October 2026.
   Scoped to teachings: actas, dictionary, lyrics and site navigation stay intact. */
html { scrollbar-gutter: stable; }
.card-list:has(.teaching-card) { align-items: start; }
.teaching-card { padding: 27px; border: 1px solid #e4dfd5; border-radius: 10px; box-shadow: 0 4px 18px rgba(53,39,25,.035); gap: 0; }
.teaching-card .card-topline { margin-bottom: 17px; }
.teaching-card .tag { white-space: normal; font-size: 13px; font-weight: 500; color: var(--red-dark); }
.teaching-card h3 { margin: 0 0 17px; font-family: Georgia, "Noto Serif JP", serif; font-size: clamp(21px, 1.8vw, 26px); line-height: 1.5; font-weight: 400; }
.teaching-card-subtitle { display: block; margin-top: 8px; color: #796348; font-size: .76em; line-height: 1.65; }
:lang(ja) .teaching-card h3, :lang(zh) .teaching-card h3, :lang(ko) .teaching-card h3 { font-family: "Noto Serif JP", serif; font-size: 21px; line-height: 1.8; font-weight: 500; }
.teaching-card > p { font-size: 15px; line-height: 1.85; color: var(--ink-2); -webkit-line-clamp: 3; }
.teaching-card .card-meta { margin-top: auto; padding-top: 23px; font-size: 13px; color: var(--muted); }
.teaching-card .card-meta span { padding: 0; background: none; }
.teaching-card .card-meta span + span::before { content: "·"; padding-right: 8px; }
.teaching-card-footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.teaching-card .status { padding: 0; background: none; font-size: 12px; color: var(--muted); }
.teaching-card .status.approved { color: #245c43; }
.teaching-card-action { color: var(--red-dark); font-size: 14px; font-weight: 600; }
.teaching-card:hover .teaching-card-action { text-decoration: underline; text-underline-offset: 5px; }
.teaching-cover { display: block; width: calc(100% + 54px); max-width: none; height: auto; margin: -27px -27px 24px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 10px 10px 0 0; }
body:has(.teaching-reading[open]) { overflow: hidden; }
.detail-dialog.teaching-reading { width: min(1190px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); border-radius: 10px; background: var(--white); scroll-behavior: auto; }
.teaching-reading .dialog-frame { padding: 0; }
.teaching-reading .dialog-close { display: none; }
.teaching-toolbar { position: sticky; z-index: 2; top: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 36px; background: var(--white); border-bottom: 1px solid var(--line); }
.teaching-back { min-height: 44px; padding: 7px 0; border: 0; color: var(--red-dark); background: transparent; font-size: 14px; text-align: left; }
.teaching-language { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.teaching-language select { width: auto; max-width: 150px; min-height: 44px; padding: 8px 25px 8px 10px; background-color: var(--white); font-size: 14px; }
.teaching-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: start; gap: 40px; padding: 38px 42px 50px; }
.teaching-article { min-width: 0; max-width: 70ch; margin: 0 auto; overflow-wrap: anywhere; }
.teaching-reading .detail-eyebrow { color: var(--red-dark); font-size: 13px; font-weight: 500; letter-spacing: .025em; }
.teaching-reading #detailTitle { font-family: Georgia, "Noto Serif JP", serif; font-weight: 400; font-size: clamp(29px, 3.3vw, 44px); line-height: 1.35; margin: 18px 0; overflow-wrap: anywhere; }
.teaching-subtitle { display: block; margin-top: 12px; color: #796348; font-size: .61em; line-height: 1.65; }
:lang(ja) .teaching-reading #detailTitle, :lang(zh) .teaching-reading #detailTitle, :lang(ko) .teaching-reading #detailTitle { font-family: "Noto Serif JP", serif; font-size: clamp(25px, 2.8vw, 36px); font-weight: 500; line-height: 1.65; }
.teaching-reading .detail-summary { margin: 20px 0; color: var(--ink-2); font-family: Georgia, "Noto Serif JP", serif; font-size: 20px; line-height: 1.8; }
.teaching-video { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 19px; margin: 4px 0 22px; color: white; background: var(--red); border-radius: 5px; font-size: 15px; text-decoration: none; }
.teaching-video:hover { background: var(--red-dark); }
.teaching-reading .detail-section { padding: 28px 0; border-top: 1px solid var(--line); }
.teaching-reading .detail-section h3, .teaching-reading .approved-method h3 { font-family: Georgia, "Noto Serif JP", serif; font-weight: 400; font-size: 26px; line-height: 1.6; margin: 0 0 15px; scroll-margin-top: 100px; }
.teaching-reading .approved-method h3 { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.teaching-reading .approved-method h4 { font-size: 18px; font-weight: 600; margin: 26px 0 12px; }
.teaching-reading .approved-method > h4:first-child { font: 400 28px/1.5 Georgia, "Noto Serif JP", serif; margin: 20px 0 18px; }
.teaching-reading .approved-method .teaching-key { margin: 24px 0; color: var(--red-dark); font-family: Georgia, "Noto Serif JP", serif; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.7; text-align: center; }
.teaching-key strong { font-weight: 500; }
.teaching-reading .detail-section p, .teaching-reading .approved-method p, .teaching-reading .approved-method li { color: var(--ink-2); font-size: 17px; line-height: 1.95; white-space: pre-line; }
.teaching-reading .approved-method p { margin: 16px 0; }
.teaching-reading .approved-method li { margin: 9px 0; }
.teaching-reading .approved-method > blockquote { margin: 30px 0; padding: 14px 0 14px 25px; border-left: 3px solid var(--red); }
.teaching-reading .approved-method > blockquote p { font-family: Georgia, "Noto Serif JP", serif; font-size: clamp(22px, 2.4vw, 29px); line-height: 1.65; color: var(--red-dark); }
.teaching-reading .detail-section:has(+ .detail-section) { border-bottom: none; }
.teaching-reading .detail-notice { padding: 14px 16px; margin: 22px 0; font-size: 14px; line-height: 1.8; }
.teaching-reading .detail-source { flex-wrap: wrap; border: 1px solid var(--line); color: var(--ink); background: var(--paper); border-radius: 5px; }
.teaching-reading .detail-source small { color: var(--muted); }
.teaching-reading .detail-source strong { white-space: normal; font-size: 15px; }
.teaching-documentation { margin: 35px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; }
.teaching-documentation > summary { min-height: 44px; display: list-item; align-content: center; color: var(--red-dark); cursor: pointer; font-size: 15px; }
.teaching-documentation[open] > summary { margin-bottom: 18px; }
.teaching-outline { position: sticky; top: 100px; min-width: 0; padding-left: 23px; border-left: 1px solid var(--line); }
.teaching-outline > summary { list-style: none; margin-bottom: 18px; font-family: Georgia, "Noto Serif JP", serif; font-size: 19px; cursor: pointer; }
.teaching-outline ol { margin: 0; padding: 0; list-style: none; }
.teaching-outline li { margin: 14px 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.teaching-outline a { color: inherit; text-decoration: none; }
.teaching-outline a:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.teaching-reading :focus-visible { outline: 3px solid var(--red-dark); outline-offset: 5px; }
.teaching-reading h3:focus { outline: none; }
.teaching-reading h3:focus-visible { outline: 2px solid var(--red-dark); outline-offset: 6px; }
.teaching-review { font-size: 13px; color: var(--muted); }
.teaching-reading .flamenco-journey { margin-top: 42px; }
@media (max-width: 850px) {
  .teaching-layout { display: flex; flex-direction: column; padding: 30px 28px 45px; gap: 25px; }
  .teaching-article { width: 100%; }
  .teaching-outline { position: static; order: -1; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 5px; }
  .teaching-outline > summary { list-style: revert; font: inherit; font-size: 15px; margin: 0; }
  .teaching-outline[open] > summary { margin-bottom: 16px; }
  .teaching-toolbar { padding: 12px 28px; }
}
@media (max-width: 620px) {
  .teaching-card { padding: 24px; border-radius: 8px; }
  .teaching-card h3 { font-size: 23px; }
  .teaching-card > p { font-size: 16px; }
  .teaching-cover { width: calc(100% + 48px); margin: -24px -24px 22px; }
  .detail-dialog.teaching-reading { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .teaching-toolbar { flex-wrap: nowrap; padding: 9px 20px; gap: 10px; }
  .teaching-back { max-width: 62%; font-size: 14px; }
  .teaching-language { flex-shrink: 0; }
  .teaching-language > span { display: none; }
  .teaching-language select { max-width: 115px; font-size: 14px; padding-left: 8px; }
  .teaching-layout { padding: 26px 24px 44px; gap: 22px; }
  .teaching-reading #detailTitle { font-size: 30px; }
  .teaching-reading .detail-summary { font-size: 18px; }
  .teaching-reading .detail-section h3, .teaching-reading .approved-method h3 { font-size: 23px; }
  .teaching-video { display: flex; justify-content: center; width: 100%; font-size: 15px; }
  .teaching-reading .approved-method > blockquote { padding-left: 18px; }
  .teaching-reading .detail-source { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) { .teaching-card { transition: none; } .teaching-card:hover { transform: none; } }
