:root {
  --ink: #262722;
  --ink-2: #34362f;
  --paper: #f8f5ee;
  --paper-2: #efebe2;
  --red: #2e5a88;
  --red-dark: #23476d;
  --gold: #c8a77b;
  --muted: #62645b;
  --line: #dbd8cf;
  --white: #fffdfa;
  --shadow: 0 10px 32px rgba(38, 39, 34, .04);
}

/* YouTube banner panels after the educational content. */
.flamenco-journey { min-width: 0; max-width: 1320px; margin: 0 auto 42px; padding: 28px 32px; border-top: 1px solid var(--line); }
.journey-heading { margin-bottom: 20px; }
.journey-heading h2, .journey-heading h3 { margin: 6px 0; font-family: "Noto Serif JP", serif; font-size: clamp(19px, 2vw, 25px); line-height: 1.5; }
.journey-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.journey-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.yt-banner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; min-width: 0; min-height: 230px; color: #fff; background: #142132; border: 1px solid #30455f; border-left: 6px solid #376aba; border-radius: 6px; overflow: hidden; text-decoration: none; }
.yt-banner-playlists { color: #1e2b3d; background: #edf1f6; border-color: #c6d0dc; border-left-color: #376aba; }
.yt-banner:hover { border-color: #a4402f; }
.yt-banner:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.yt-banner-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding: 28px 32px; overflow-wrap: anywhere; }
.yt-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.yt-brand svg { flex: 0 0 27px; width: 27px; height: 19px; }
.yt-brand small { font-size: 11px; font-weight: 400; }
.yt-banner-copy h3, .yt-banner-copy h4 { max-width: 720px; margin: 14px 0 9px; color: inherit; font-size: clamp(23px, 2.6vw, 32px); font-weight: 700; line-height: 1.4; }
.yt-banner-copy p { max-width: 650px; margin: 0; color: #d4dfed; font-size: 14px; line-height: 1.75; }
.yt-banner-playlists .yt-banner-copy p { color: #42546b; }
.netclass-languages { display: flex; flex-direction: column; gap: 6px; margin-top: 15px; max-width: 100%; }
.netclass-languages small { font-size: 11px; line-height: 1.5; color: #d4dfed; }
.netclass-languages [role="img"] { font-size: 20px; line-height: 1.5; white-space: nowrap; letter-spacing: 2px; }
.yt-banner-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; max-width: 100%; margin-top: 18px; padding: 9px 15px; color: #172337; background: #fff; border-radius: 4px; font-size: 13px; font-weight: 700; }
.yt-banner-playlists .yt-banner-action { color: #fff; background: #214d8b; }
.yt-banner > img { display: block; width: 100%; height: auto; min-width: 0; aspect-ratio: 1672 / 941; object-fit: contain; }
.journey-compact { margin: 28px 0 0; padding: 24px 0 0; }
.journey-compact .journey-heading { margin-bottom: 14px; }
.journey-compact .journey-heading h3 { font-size: 17px; }
.journey-compact .journey-heading p { font-size: 13px; }
.journey-compact .yt-banner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.journey-compact .yt-banner > img { grid-row: 1; }
.journey-compact .yt-banner-copy { padding: 20px; }
.journey-compact .yt-banner-copy h4 { font-size: 21px; }
.journey-compact .yt-banner-action { margin-top: 13px; }
@media (max-width: 760px) {
  .flamenco-journey { padding: 24px 20px; }
  .yt-banner { grid-template-columns: minmax(0, 1fr); }
  .yt-banner-copy { padding: 22px; }
  .yt-banner > img { grid-row: 1; }
  .journey-compact .yt-banner { grid-template-columns: minmax(0, 1fr); }
  .journey-compact .yt-banner-copy { padding: 16px; }
  .journey-compact .yt-banner-copy h4 { font-size: 19px; }
  .journey-compact { padding: 20px 0 0; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans JP", system-ui, sans-serif; font-size: 16px; line-height: 1.75; }
button, input, select { font: inherit; }
button { cursor: pointer; white-space: normal; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; color: white; background: var(--ink); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px max(24px, calc((100vw - 1320px) / 2)); color: white; background: rgba(23, 21, 19, .97); border-bottom: 1px solid rgba(255,255,255,.11); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 700 15px/1 Georgia, serif; letter-spacing: .05em; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Noto Serif JP", serif; font-size: 17px; letter-spacing: .03em; }
.brand small { margin-top: 1px; color: #bdb6ad; font-size: 10px; letter-spacing: .18em; }
.top-actions { flex-shrink: 0; display: flex; align-items: center; gap: 18px; }
.sync-note { color: #bbb4ab; font-size: 13px; }
.language-switch { display: flex; padding: 3px; background: #302c28; border-radius: 999px; }
.lang-button { padding: 5px 10px; border: 0; border-radius: 999px; color: #c7c0b8; background: transparent; font-size: 12px; }
.lang-button.active { color: var(--ink); background: var(--white); }

main { overflow: clip; }
.intro-shell { position: relative; max-width: 1320px; min-height: 0; margin: 0 auto; padding: 24px 32px; border-top: 4px solid var(--red); display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.intro-shell::before, .intro-shell::after { display: none; }
.intro-copy { min-width: 0; max-width: 1020px; overflow-wrap: anywhere; }
.eyebrow { margin: 0 0 10px; color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .13em; }
h1 { max-width: 1000px; margin: 0; font-family: "Noto Serif JP", serif; font-size: clamp(26px, 2.5vw, 34px); line-height: 1.35; letter-spacing: -.02em; }
.intro-text { max-width: 720px; margin: 13px 0 0; color: var(--muted); font-size: 16px; }
.rhythm-seal { flex: 0 0 90px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--red); font: 700 17px/1 Georgia, serif; transform: rotate(-7deg); }
.rhythm-seal span:nth-of-type(1) { grid-area: 1 / 2; }.rhythm-seal span:nth-of-type(2) { grid-area: 2 / 3; }.rhythm-seal span:nth-of-type(3) { grid-area: 3 / 2; }.rhythm-seal span:nth-of-type(4) { grid-area: 2 / 1; }
.rhythm-seal i { position: absolute; width: 72px; height: 1px; background: var(--line); }.rhythm-seal i:nth-of-type(2) { transform: rotate(60deg); }.rhythm-seal i:nth-of-type(3) { transform: rotate(-60deg); }

.workspace { max-width: 1320px; margin: 0 auto 70px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.level-navigator { min-width: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px; padding: 20px; color: white; background: var(--ink); border-bottom: 1px solid #39342f; }
.level-navigator[hidden] { display: none; }
.level-navigator-copy { flex: 1 1 100%; }
.level-navigator-copy span, .level-navigator-copy small { display: block; }
.level-navigator-copy span { color: var(--gold); font-size: 15px; font-weight: 700; }
.level-navigator-copy small { margin-top: 6px; color: #d3ccc4; font-size: 12px; line-height: 1.7; }
.quick-levels { flex: 1 1 100%; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick-level { min-width: 0; padding: 12px; border: 1px solid #55504a; border-radius: 6px; color: #e5dfd8; background: transparent; text-align: left; overflow-wrap: anywhere; }
.quick-level-title { display: block; font-size: 14px; font-weight: 700; }
.quick-level small { display: block; margin: 5px 0 8px; font-size: 12px; line-height: 1.6; font-weight: 400; }
.quick-level-count { font-size: 11px; opacity: .85; }
.quick-level:hover, .quick-level.active { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.view-description { margin: 0; padding: 16px 24px; background: var(--paper-2); font-size: 14px; line-height: 1.8; border-bottom: 1px solid var(--line); }
.audience-note { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.latest-actas { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--red); border-radius: 6px; color: white; background: var(--red); font-size: 12px; font-weight: 700; }
.latest-actas b { min-width: 23px; padding: 1px 6px; border-radius: 99px; color: var(--red-dark); background: white; font-size: 10px; }
.search-panel { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--line); }
.search-box { min-width: 320px; flex: 1; display: flex; align-items: center; gap: 12px; padding: 20px 24px; }
.search-box svg { flex: 0 0 22px; width: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; }
.search-box kbd { padding: 2px 7px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; white-space: nowrap; }
.view-tabs { display: flex; border-left: 1px solid var(--line); }
.view-tab { min-width: 112px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-left: 1px solid var(--line); color: var(--muted); background: transparent; font-weight: 600; }
.view-tab:first-child { border-left: 0; }
.view-tab b { min-width: 24px; padding: 1px 6px; border-radius: 99px; background: var(--paper-2); font-size: 11px; }
.view-tab.active { color: var(--red); box-shadow: inset 0 -3px var(--red); }

.content-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 680px; }
.content-grid.source-view { grid-template-columns: minmax(0, 1fr); }
.filters[hidden] { display: none; }
.filters { min-width: 0; padding: 26px 22px; background: #f2eee8; border-right: 1px solid var(--line); }
.compact-filter { margin-top: 18px; padding-top: 16px; }
.filter-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.filter-heading button { min-height: 44px; padding: 6px 8px; border: 0; color: var(--red); background: transparent; font-size: 14px; }
.category-list { display: grid; gap: 5px; }
.category-button { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 10px 11px; border: 1px solid transparent; border-radius: 8px; color: var(--ink-2); background: transparent; text-align: left; font-size: 13px; }
.category-button:hover { border-color: var(--line); background: rgba(255,255,255,.65); }
.category-button.active { color: white; background: var(--ink); }
.category-button b { color: var(--muted); font-size: 11px; }.category-button.active b { color: #d8d1c8; }
.filter-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.filter-section p { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.filter-label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 700; letter-spacing: .08em; }
select { width: 100%; min-width: 0; max-width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--white); font-size: 16px; }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.check-row input { accent-color: var(--red); margin-top: 6px; }
.source-principle { margin-top: 30px; padding: 15px; border: 1px solid #d8c39e; color: #69583b; background: #f8f0df; border-radius: 8px; }
.source-principle span { color: var(--red); font-weight: 700; }.source-principle p { margin: 5px 0 0; font-size: 12px; line-height: 1.65; }

.results { min-width: 0; padding: 30px 34px 40px; }
.results-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; overflow-wrap: anywhere; }
.results-heading p { margin: 0 0 3px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.results-heading h2 { margin: 0; font-family: "Noto Serif JP", serif; font-size: 25px; }
#resultCount { color: var(--muted); font-size: 13px; }
.card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.knowledge-card { display: flex; flex-direction: column; align-items: stretch; position: relative; width: 100%; min-width: 0; max-width: 100%; padding: 22px 22px 20px; border: 1px solid var(--line); color: var(--ink); background: var(--white); text-align: left; white-space: normal; overflow-wrap: anywhere; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.knowledge-card::before { content: ""; position: absolute; left: -1px; top: 20px; bottom: 20px; width: 3px; background: var(--red); }
.knowledge-card:hover { transform: translateY(-2px); border-color: #bcb1a4; box-shadow: 0 12px 28px rgba(40,31,23,.08); }
.card-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--red); font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.status { flex: 0 0 auto; padding: 2px 7px; border-radius: 99px; color: #64512e; background: #f4e8cc; font-size: 12px; }
.status.approved { color: #245c43; background: #dfeee6; }
.knowledge-card h3 { margin: 0 0 10px; font-family: "Noto Serif JP", serif; font-size: 18px; line-height: 1.55; }
.knowledge-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.knowledge-card mark { padding: 0 .08em; color: inherit; background: #f3d28f; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; color: #746d65; font-size: 14px; }
.card-meta span { padding: 2px 7px; background: var(--paper); border-radius: 4px; }
.glossary-nav { min-width: 0; margin-bottom: 28px; padding: 18px; border: 1px solid var(--line); background: var(--paper); scroll-margin-top: 100px; }
.glossary-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.glossary-order { display: flex; flex-wrap: wrap; gap: 8px; }
.glossary-order button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); font-size: 14px; }
.glossary-order button[aria-pressed="true"] { color: white; background: var(--ink); border-color: var(--ink); }
.glossary-hint { margin: 12px 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.glossary-initials { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; }
.glossary-initials button { min-width: 0; min-height: 44px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--red-dark); background: var(--white); font-size: 16px; font-weight: 700; }
.glossary-initials button:disabled { color: #81796f; background: transparent; border-style: dashed; cursor: default; }
.glossary-initials button:not(:disabled):hover { border-color: var(--red); background: #f6e5de; }
.glossary-list { display: block; }
.glossary-group { min-width: 0; margin-bottom: 28px; }
.glossary-group-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.glossary-group-heading h3 { margin: 0; color: var(--red-dark); font-size: 25px; scroll-margin-top: 100px; }
.glossary-group-heading h3 small { color: var(--muted); font-size: 14px; font-weight: 400; }
.glossary-group-heading button, #clearGlossarySearch { min-height: 44px; padding: 6px 8px; color: var(--red-dark); background: transparent; border: 0; text-decoration: underline; font-size: 14px; }
.glossary-group-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.glossary-card h4 { font-family: "Noto Serif JP", serif; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; overflow-wrap: anywhere; font-size: 18px; line-height: 1.55; }
.glossary-card h4 small { color: var(--red); font: 600 14px "Noto Sans JP", sans-serif; }
.glossary-meaning { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.glossary-card p { display: block; overflow: visible; }
.glossary-nav button:focus-visible, .glossary-group-heading button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.letter-meaning-card { text-align: left; }
.letter-meaning-card h4 { margin: 0 0 10px; font-family: "Noto Serif JP", serif; font-size: 18px; line-height: 1.55; }
.letter-incipit { margin-bottom: 10px; color: var(--red-dark); font-size: 16px; overflow-wrap: anywhere; }
.letter-palo-control { display: grid; gap: 5px; max-width: 380px; min-width: 0; margin-top: 16px; }
.letter-palo-control label { font-size: 14px; font-weight: 600; }
.letter-palo-control select { min-height: 44px; font-size: 16px; }
.index-clear { min-height: 44px; padding: 6px 8px; color: var(--red-dark); background: transparent; border: 0; text-decoration: underline; font-size: 14px; }
.letter-body { white-space: pre-line; }
.acta-list { position: relative; }
.acta-date { color: var(--red); font-size: 14px; font-weight: 700; }
.acta-open { color: var(--red); font-weight: 600; }
.video-index { color: var(--muted); font-size: 14px; }
.video-link { align-self: flex-start; margin-top: 16px; padding: 8px 12px; border: 1px solid var(--line); color: var(--red); background: var(--paper); border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; }
.sidebar-index { min-width: 0; scroll-margin-top: 100px; }
.sidebar-index .glossary-order { display: grid; width: 100%; }
.sidebar-index .glossary-initials { grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); }
.sidebar-index .glossary-hint { font-size: 14px; line-height: 1.65; }
.empty-state { padding: 90px 20px; color: var(--muted); text-align: center; }.empty-state span { color: var(--red); font-size: 40px; }.empty-state h3 { margin: 8px 0; color: var(--ink); }

.detail-dialog { width: min(800px, calc(100vw - 30px)); max-height: min(900px, calc(100vh - 30px)); overflow-y: auto; padding: 0; border: 0; color: var(--ink); background: var(--white); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.detail-dialog.acta-full-dialog { width: min(1080px, calc(100vw - 30px)); }
.detail-dialog::backdrop { background: rgba(14, 12, 10, .74); backdrop-filter: blur(4px); }
.dialog-frame { position: relative; padding: 42px clamp(24px, 6vw, 58px) 50px; }
.dialog-close { position: absolute; right: 16px; top: 14px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; font-size: 22px; line-height: 1; }
.detail-eyebrow { margin: 0 0 8px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .09em; }
.detail-dialog h2 { margin: 0; font-family: "Noto Serif JP", serif; font-size: clamp(25px, 4vw, 36px); line-height: 1.5; }
.detail-summary { margin: 18px 0 26px; color: var(--muted); font-size: 16px; }
.detail-section { padding: 20px 0; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 7px; font-size: 14px; }.detail-section p { margin: 0; }
.detail-source { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 18px; color: white; background: var(--ink); }
.detail-source div { min-width: 0; }.detail-source small, .detail-source strong { display: block; }.detail-source small { color: #bbb4ac; }.detail-source strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-source a { flex: 0 0 auto; padding: 8px 12px; color: white; background: var(--red); border-radius: 6px; text-decoration: none; font-size: 12px; }
.detail-notice { margin-top: 16px; padding: 11px 13px; color: #64512e; background: #f4e8cc; border-radius: 6px; font-size: 12px; }
.acta-document { margin-top: 28px; }
.acta-document h3 { margin: 28px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); font-family: "Noto Serif JP", serif; font-size: 18px; line-height: 1.55; }
.acta-document p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.acta-document a { color: var(--red-dark); text-underline-offset: 3px; }
.acta-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.acta-links a { padding: 9px 14px; color: white; background: var(--ink); border-radius: 6px; text-decoration: none; font-size: 13px; }
.acta-links a:first-child { background: var(--red); }
.acta-reading-status { display: inline-flex; margin: 20px 0 8px; padding: 7px 11px; color: var(--red); border: 1px solid rgba(184, 35, 28, .28); background: rgba(184, 35, 28, .06); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.acta-full-dialog .acta-document { margin-top: 8px; }
.acta-full-dialog .reader-language { max-width: none; }
.acta-full-dialog .reader-language:first-child { padding-top: 0; }

.reader-view { max-width: 1320px; margin: 0 auto 70px; padding: 26px 24px 0; }
.reader-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.reader-breadcrumb a { color: var(--red-dark); text-decoration: none; }
.reader-breadcrumb span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); align-items: start; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.reader-aside { position: sticky; top: 96px; min-width: 0; padding: 26px 22px; background: #f2eee8; border-right: 1px solid var(--line); }
.reader-date { margin: 0; color: var(--red-dark); font: 700 18px/1.3 Georgia, serif; }
.reader-level { display: inline-block; margin-top: 9px; padding: 3px 9px; color: white; background: var(--ink); border-radius: 99px; font-size: 11px; font-weight: 700; }
.reader-actions { display: grid; gap: 8px; margin: 22px 0; }
.reader-actions a, .reader-actions button { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--white); text-align: center; text-decoration: none; font-size: 12px; font-weight: 700; }
.reader-actions a { color: white; background: var(--red); border-color: var(--red); }
.reader-toc { padding-top: 18px; border-top: 1px solid var(--line); }
.reader-toc strong { display: block; margin-bottom: 9px; font-size: 12px; letter-spacing: .08em; }
.reader-toc ol { max-height: 50vh; overflow-y: auto; margin: 0; padding-left: 20px; }
.reader-toc li { margin: 5px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.reader-toc a { color: inherit; text-decoration: none; }
.reader-toc a:hover { color: var(--red); }
.reader-article { min-width: 0; padding: 48px clamp(28px, 6vw, 78px) 56px; overflow-wrap: anywhere; }
.reader-article > header { padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.reader-article h1 { max-width: 900px; font-size: clamp(28px, 4vw, 46px); }
.reader-summary { max-width: 800px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.reader-language { max-width: 820px; padding-top: 12px; }
.language-heading { display: flex; align-items: center; gap: 12px; margin: 34px 0 10px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.language-heading::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.reader-language h2 { scroll-margin-top: 100px; margin: 34px 0 12px; font-family: "Noto Serif JP", serif; font-size: 21px; line-height: 1.55; }
.reader-language p { margin: 0 0 17px; color: var(--ink-2); font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.time-link { display: inline-block; padding: 0 5px; color: var(--red-dark); background: #f4e8cc; border-radius: 4px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.time-link:hover { color: white; background: var(--red); }
.language-divider { display: flex; align-items: center; gap: 15px; margin: 48px 0 12px; color: var(--gold); font: 700 13px/1.4 Georgia, serif; letter-spacing: .14em; }
.language-divider::before, .language-divider::after { content: ""; height: 1px; flex: 1; background: var(--gold); }
.reader-notice { max-width: 820px; margin: 38px 0 0; padding: 14px 16px; color: #64512e; background: #f4e8cc; border-radius: 6px; font-size: 13px; }
.related-learning { max-width: 820px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.related-learning h2 { margin: 0 0 14px; font-family: "Noto Serif JP", serif; font-size: 20px; }
.related-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.related-card { padding: 14px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); text-align: left; font-size: 13px; line-height: 1.55; }
.related-card small { display: block; margin-bottom: 5px; color: var(--red); }
.reader-pagination { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 820px; margin-top: 42px; }
.reader-pagination a { padding: 14px 16px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); text-decoration: none; font-size: 13px; }
.reader-pagination a:last-child { text-align: right; }
.reader-pagination small, .reader-pagination strong { display: block; }
.reader-pagination small { margin-bottom: 4px; color: var(--red); font-size: 10px; letter-spacing: .06em; }

footer { max-width: 1320px; margin: 0 auto; padding: 0 24px 34px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .sync-note, .rhythm-seal { display: none; }
  .intro-shell { min-height: 0; padding: 20px 24px; }
  .intro-shell::before { right: 82%; }
  .workspace { margin: 0 14px 44px; }
  .level-navigator { align-items: stretch; gap: 12px; }
  .level-navigator-copy { display: block; }
  .search-panel { display: block; }
  .view-tabs { border-left: 0; border-top: 1px solid var(--line); }
  .view-tab { min-width: 0; min-height: 52px; flex: 1; }
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .filters { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-list { display: flex; overflow-x: auto; padding-bottom: 5px; }
  .category-button { flex: 0 0 auto; width: auto; }
  .source-principle { display: none; }
  .filter-section { display: block; }
  .sidebar-index .glossary-order { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-view { padding: 18px 14px 0; }
  .reader-layout { grid-template-columns: minmax(0, 1fr); }
  .reader-aside { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .reader-actions { grid-column: 2; grid-row: 1 / 3; min-width: 150px; margin: 0; }
  .reader-toc { grid-column: 1 / -1; }
  .reader-toc ol { max-height: none; columns: 2; }
}
@media (max-width: 620px) {
  .topbar { min-height: 64px; gap: 12px; padding: 8px 14px; }
  .brand-mark { flex: 0 0 36px; width: 36px; height: 36px; }.brand strong { font-size: 14px; }.brand small { display: none; }
  .intro-text { font-size: 16px; }
  .level-navigator { padding: 10px 12px; }
  .latest-actas span { display: inline; }
  .quick-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-description { padding: 14px 16px; }
  .search-box { min-width: 0; padding: 16px; }.search-box kbd { display: none; }
  .view-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view-tab { min-width: 0; flex-direction: column; gap: 4px; padding: 10px 6px; font-size: 14px; line-height: 1.5; }
  .view-tab > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .filters { padding: 18px 16px; }
  .results { padding: 24px 16px 30px; }
  .card-list { grid-template-columns: minmax(0, 1fr); }
  .glossary-group-cards { grid-template-columns: minmax(0, 1fr); }
  .glossary-nav { padding: 12px; }
  .knowledge-card { padding: 18px 16px; }
  .video-link { align-self: stretch; text-align: center; }
  .dialog-frame { padding: 42px 20px 34px; }
  .detail-dialog { overflow-wrap: anywhere; }
  .detail-source { flex-wrap: wrap; }
  .detail-source div { width: 100%; }
  .acta-document p { font-size: 16px; }
  .reader-breadcrumb { margin-left: 2px; }
  .reader-aside { display: block; padding: 20px 18px; }
  .reader-actions { display: flex; flex-wrap: wrap; min-width: 0; margin: 16px 0 0; }
  .reader-actions > * { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .reader-toc { display: block; }
  .reader-toc ol { max-height: 160px; overflow-y: auto; columns: 1; }
  .reader-article { padding: 34px 20px 40px; }
  .reader-summary { font-size: 16px; }
  .reader-language p { font-size: 16px; line-height: 1.9; }
  .related-list { grid-template-columns: minmax(0, 1fr); }
  .reader-pagination { grid-template-columns: minmax(0, 1fr); }
  .reader-pagination a:last-child { text-align: left; }
  footer { display: block; } footer span { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Source-linked author-approved teaching additions */
.detail-section p { white-space: pre-line; }
.source-moments { display: grid; gap: .7rem; margin: 1rem 0 1.5rem; }
.source-moments a { overflow-wrap: anywhere; }
.validated-addition { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line, #ddd); }

.translation-notice { max-width: 1280px; margin: 18px auto 0; padding: 12px 18px; background: #f4e8cc; color: #64512e; border-radius: 8px; font-size: 14px; line-height: 1.6; }
@media (max-width: 620px) {
  .topbar { flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .language-switch { max-width: 100%; flex-wrap: wrap; justify-content: center; }
  .translation-notice { margin: 12px 14px 0; }
}

.language-switch.aa-language-picker { background: transparent; border-radius: 0; padding: 0; }
.language-switch.aa-language-picker .aa-language-choice { border-radius: 4px; }
@media (max-width: 1100px) { .topbar { flex-wrap: wrap; } .top-actions { width: 100%; justify-content: flex-end; } }
@media (max-width: 640px) { .top-actions { justify-content: flex-start; } }

/* Compact catalog, full-source reading and accessible controls. */
:focus-visible { outline: 3px solid var(--red-dark); outline-offset: 3px; }
.topbar :focus-visible, .level-navigator :focus-visible { outline-color: var(--gold); }
.search-box:focus-within { box-shadow: inset 0 0 0 3px var(--red-dark); }
.level-navigator { align-items: center; gap: 12px 20px; padding: 12px 24px; }
.level-navigator > label { font-size: 14px; font-weight: 600; }
.level-navigator > select { width: min(320px, 100%); min-height: 44px; flex: 0 1 320px; }
.latest-actas { margin-left: auto; min-height: 44px; font-size: 14px; }
.latest-actas b { font-size: 12px; }
.filter-controls { display: none; }
.catalog-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; padding: 24px 0 0; font-size: 14px; }
.catalog-pagination button { min-height: 44px; padding: 10px 24px; border: 1px solid var(--ink); color: white; background: var(--ink); font-size: 16px; }
.category-button, .check-row { font-size: 14px; }
.category-button { min-height: 44px; }
.search-box input { min-height: 32px; }
.dialog-close { position: sticky; float: right; top: 0; right: auto; width: 44px; height: 44px; margin: -24px -12px 0 12px; background: var(--white); z-index: 2; }
@media (max-width: 900px) {
  .filter-controls { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .filter-controls button { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--ink); font-size: 14px; }
  .filter-controls b { padding: 1px 7px; border-radius: 99px; background: var(--paper-2); }
  .filter-contents { display: none; margin-top: 18px; }
  .filters-open .filter-contents { display: block; }
  .filters { padding: 12px 16px; }
  .filter-section { margin-top: 12px; padding-top: 12px; }
}
@media (max-width: 620px) {
  .intro-shell { padding: 18px 16px; }
  .eyebrow { font-size: 14px; letter-spacing: .04em; }
  .level-navigator { padding: 12px 16px; gap: 8px; }
  .level-navigator > label { width: 100%; }
  .level-navigator > select { flex: 1 1 100%; width: 100%; }
  .latest-actas { margin-left: 0; }
  .view-description { padding: 10px 16px; }
  .brand strong { font-size: 16px; }
  .topbar { gap: 4px; }
  .top-actions { margin-top: 0; }
  .dialog-close { margin-top: -28px; margin-right: -8px; }
}

.brand > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.beta-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 3px 8px; border-radius: 4px; background: var(--gold); color: var(--ink); font: 800 12px/1.4 system-ui, sans-serif; letter-spacing: .06em; }
.project-nav { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 8px 24px; min-width: 0; width: 100%; border-top: 1px solid #ffffff25; padding-top: 8px; }
.project-nav a { display: flex; align-items: center; min-height: 44px; color: #f7f4ef; font-size: 14px; text-decoration: none; }
.project-nav a:hover, .project-nav a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-underline-offset: 5px; }
.topbar { flex-wrap: wrap; gap: 8px 24px; }
.project-beta-note { font-size: 14px; line-height: 1.7; color: var(--muted); padding-left: 14px; border-left: 3px solid var(--gold); }
.home-beta-note { max-width: 1280px; margin: 14px auto 0; padding-right: 20px; }
.project-info { max-width: 920px; margin: 36px auto 64px; padding: 32px; border: 1px solid var(--line); background: var(--white); }
.project-info h1 { margin: 14px 0 24px; }
.project-info h2 { margin-top: 30px; font-size: 22px; }
.project-info p, .project-info li { max-width: 760px; overflow-wrap: anywhere; }
.project-info li + li { margin-top: 12px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.project-actions a { min-height: 44px; display: flex; align-items: center; padding: 10px 16px; border: 1px solid var(--red-dark); color: var(--red-dark); text-decoration: none; }
.project-actions .project-primary { color: var(--white); background: var(--red-dark); }
@media (max-width: 620px) {
  .project-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .project-nav a { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
  .brand { gap: 8px; }
  .brand-beta { padding: 3px 6px; font-size: 11px; }
  .home-beta-note { margin: 12px 16px 0; }
  .project-info { margin: 20px 14px 40px; padding: 22px 18px; }
}

/* Enciclopedia Flamenca BG · warm Japanese library. */
.search-form { display: flex; gap: 10px; max-width: 820px; margin: auto; min-width: 0; align-items: stretch; }
.search-form .search-box { flex: 1; margin: 0; }
.search-submit { flex: 0 0 auto; min-height: 44px; padding: 12px 24px; border: 1px solid var(--red-dark); border-radius: 3px; color: var(--white); background: var(--red-dark); font-size: 16px; }
.search-submit:hover { background: var(--red); }
.search-feedback { max-width: 820px; margin: 12px auto 0; padding: 10px 14px; border-left: 3px solid var(--red); color: var(--ink); background: var(--paper-2); font-size: 14px; overflow-wrap: anywhere; }
#searchResultsHeading { scroll-margin-top: 20px; }
.source-original { margin: 18px 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--paper); }
.source-original summary { min-height: 44px; color: var(--red-dark); font-size: 14px; cursor: pointer; }
.source-original p { white-space: pre-line; overflow-wrap: anywhere; }
.source-original small { display: block; color: var(--muted); font-size: 14px; }
.topbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 16px max(24px, calc((100vw - 1200px) / 2)); color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); backdrop-filter: none; }
.brand { justify-self: start; gap: 16px; max-width: 100%; }
.brand-logo { display: block; width: 264px; max-width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: contain; }
.brand-accessible { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.beta-badge { border: 1px solid var(--red); color: var(--red-dark); background: transparent; border-radius: 2px; font-size: 12px; letter-spacing: .1em; }
.top-actions { width: auto; min-width: 0; justify-content: flex-end; }
.sync-note { display: none; }
.topbar { --aa-language-color: var(--ink); --aa-language-border: var(--line); --aa-language-hover: var(--paper-2); --aa-language-focus: var(--red); }
.topbar :focus-visible { outline-color: var(--red-dark); }
.project-nav { grid-column: 1 / -1; width: 100%; gap: 8px 32px; padding-top: 8px; border-top: 1px solid var(--line); }
.project-nav a { color: var(--muted); font-size: 14px; }
.project-nav a:hover, .project-nav a[aria-current="page"] { color: var(--red-dark); }
.home-beta-note { max-width: 1200px; margin: 14px auto 0; padding: 0 24px; border: 0; color: var(--muted); font-size: 14px; text-align: center; }
.intro-shell { max-width: 1200px; display: block; border-top: 0; padding: 24px 32px 20px; text-align: center; }
.intro-copy { max-width: 850px; margin: auto; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 14px; font-weight: 600; letter-spacing: .05em; }
.intro-shell h1 { max-width: 850px; font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.6; }
.intro-text { max-width: 720px; margin: 12px auto 0; color: var(--ink-2); font-size: 16px; line-height: 1.9; }
.audience-note { max-width: 740px; margin: 8px auto 0; font-size: 14px; }
.topic-index { max-width: 1136px; margin: 0 auto 24px; padding: 20px 24px; border: 1px solid var(--line); border-top: 3px solid var(--red); background: var(--white); }
.topic-index-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.topic-index h2 { margin: 0; font-size: 20px; }
.topic-index-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-index-modes button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); }
.topic-index-modes button[aria-pressed="true"] { color: var(--white); border-color: var(--ink); background: var(--ink); }
.topic-index-hint { margin: 12px 0 16px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.topic-initials { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; }
.topic-initials button { min-width: 0; min-height: 44px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--red-dark); background: var(--paper); font-size: 16px; font-weight: 600; }
.topic-initials button[aria-pressed="true"] { color: var(--white); border-color: var(--red-dark); background: var(--red-dark); }
.topic-initials button:disabled { color: var(--muted); background: transparent; border-style: dashed; cursor: default; opacity: .55; }
.topic-initials button:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--red); }
.topic-terms { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.topic-terms h3 { margin: 0 0 12px; font-size: 20px; }
.topic-terms h3 small { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 400; }
.topic-term-links { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-term-links a { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--paper); overflow-wrap: anywhere; text-decoration: none; }
.topic-term-links a:hover { border-color: var(--red); color: var(--red-dark); }
.topic-term-links small { color: var(--muted); font-size: 13px; }
.topic-index :focus-visible, .glossary-card:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.glossary-card { scroll-margin-top: 100px; }
.topic-overview { margin-bottom: 20px; padding: 16px; border: 1px solid var(--line); background: var(--paper); }
.topic-overview-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.topic-overview p { margin: 0; overflow-wrap: anywhere; }
.topic-overview-heading button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); color: var(--red-dark); background: var(--white); }
.topic-definition { margin-top: 12px; }
.topic-definition summary { min-height: 44px; padding: 8px 0; cursor: pointer; color: var(--red-dark); }
@media (max-width: 1200px) { .topic-index { margin-left: 32px; margin-right: 32px; } }
@media (max-width: 620px) { .topic-index { margin-left: 16px; margin-right: 16px; padding: 16px 12px; } .topic-index-modes { width: 100%; } .topic-index-modes button { flex: 1; } }
.workspace { max-width: 1200px; margin: 0 auto 64px; border: 0; box-shadow: none; background: transparent; }
.search-panel { display: block; padding: 0 32px; border: 0; }
.search-box { min-width: 0; max-width: 820px; margin: 0 auto; padding: 16px 22px; border: 1px solid var(--ink); border-radius: 3px; background: var(--white); box-shadow: 0 4px 0 var(--paper-2); }
.search-box svg { stroke: var(--red); }
.search-box input { min-height: 34px; font-size: 17px; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-scope { margin: 18px 0 2px; color: var(--muted); text-align: center; font-size: 14px; }
.view-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1040px; margin: auto; border-left: 0; border-bottom: 1px solid var(--line); }
.view-tab { min-width: 0; min-height: 58px; gap: 7px; padding: 12px 8px; border: 0; font-size: 14px; line-height: 1.5; }
.view-tab > span { min-width: 0; overflow-wrap: anywhere; }
.view-tab b { min-width: 0; font-size: 12px; background: transparent; color: var(--muted); }
.view-tab:hover { color: var(--red-dark); background: var(--paper-2); }
.view-tab.active { color: var(--red-dark); box-shadow: inset 0 -3px var(--red); }
.start-guide { margin: 14px 32px 0; padding: 0 18px; border: 1px solid var(--line); background: var(--paper-2); }
.start-guide summary { min-height: 44px; padding: 10px 0; color: var(--red-dark); font-size: 14px; font-weight: 600; cursor: pointer; }
.start-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-bottom: 18px; }
.start-path { min-width: 0; padding: 8px 20px; border-left: 1px solid var(--line); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.start-path:first-child { border-left: 0; padding-left: 0; }
.start-number { display: block; color: var(--red); font-family: Georgia, serif; font-size: 18px; }
.start-path strong { display: block; margin-top: 6px; font-size: 16px; }
.start-path p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.start-path:hover strong { color: var(--red-dark); text-decoration: underline; text-underline-offset: 4px; }
.view-description { padding: 14px 32px 10px; color: var(--muted); background: transparent; border: 0; }
.level-navigator { margin: 0 32px; padding: 10px 0 16px; color: var(--ink); background: transparent; border-bottom: 1px solid var(--line); }
.level-navigator :focus-visible { outline-color: var(--red-dark); }
.latest-actas { border-radius: 3px; color: var(--red-dark); background: transparent; }
.latest-actas:hover { background: var(--paper-2); }
.latest-actas b { background: var(--paper-2); }
.content-grid { grid-template-columns: 224px minmax(0, 1fr); padding: 20px 32px 0; min-height: 520px; }
.filters { padding: 6px 22px 20px 0; background: transparent; }
.category-button { border-radius: 3px; }
.category-button.active { color: var(--red-dark); background: var(--paper-2); border-left: 3px solid var(--red); }
.category-button.active b { color: var(--muted); }
.filter-label { letter-spacing: .02em; }
.results { padding: 4px 0 32px 28px; }
.results-heading { margin-bottom: 18px; }
.results-heading h2 { font-size: 24px; font-weight: 600; }
.results-heading p, #resultCount { font-size: 14px; }
.card-list { gap: 16px; }
.knowledge-card { border-radius: 3px; background: var(--white); box-shadow: 0 2px 0 var(--paper-2); }
.knowledge-card::before { display: none; }
.knowledge-card:hover { transform: translateY(-2px); border-color: var(--red); box-shadow: 0 8px 22px rgba(38,39,34,.06); }
.knowledge-card h3 { font-weight: 600; line-height: 1.7; }
.knowledge-card p { line-height: 1.85; }
.source-principle { padding: 12px; border-color: var(--line); color: var(--muted); background: var(--paper-2); border-radius: 3px; }
.source-principle p { font-size: 14px; }
.project-info { border-top: 3px solid var(--red); border-radius: 3px; box-shadow: var(--shadow); }
.project-info h1 { font-weight: 600; }
.reader-layout { border-top: 3px solid var(--red); }
.reader-aside { position: static; background: var(--paper-2); }
.reader-actions a, .reader-actions button, .reader-toc strong { font-size: 14px; }
.reader-toc li { font-size: 14px; }
.detail-source a, .detail-notice { font-size: 14px; }
footer { max-width: 1200px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 900px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .filters { border-right: 0; padding: 0 0 14px; }
  .results { padding: 8px 0 28px; }
  .view-tab { flex-direction: column; gap: 3px; }
  .start-path { padding: 8px 14px; }
}
@media (max-width: 620px) {
  .topbar { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 4px; gap: 4px; }
  .brand { gap: 12px; }
  .brand-logo { width: 220px; }
  .brand-beta { padding: 3px 6px; font-size: 12px; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .project-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; padding-top: 4px; }
  .project-nav a { font-size: 14px; padding: 6px 0; }
  .home-beta-note { margin: 12px 0 0; padding: 0 16px; text-align: left; font-size: 14px; }
  .intro-shell { padding: 18px 16px; text-align: left; }
  .intro-shell h1 { font-size: 26px; line-height: 1.65; }
  .intro-text { font-size: 16px; margin-top: 10px; }
  .audience-note { font-size: 14px; }
  .search-panel { padding: 0 16px; }
  .search-box { padding: 13px 14px; gap: 10px; }
  .search-box input { font-size: 16px; }
  .search-form { gap: 8px; }
  .search-submit { padding: 12px; font-size: 14px; }
  .search-scope { margin-top: 16px; text-align: left; }
  .view-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view-tab { min-height: 60px; padding: 10px 5px; }
  .start-guide { margin: 14px 16px 0; padding: 0 14px; }
  .start-paths { grid-template-columns: minmax(0, 1fr); padding-bottom: 12px; }
  .start-path, .start-path:first-child { padding: 12px 0; border-left: 0; border-top: 1px solid var(--line); }
  .start-number { display: inline; margin-right: 8px; font-size: 16px; }
  .start-path strong { display: inline; }
  .view-description { padding: 12px 16px 8px; }
  .level-navigator { margin: 0 16px; padding: 8px 0 12px; }
  .content-grid { padding: 12px 16px 0; }
  .results-heading h2 { font-size: 22px; }
  .reader-view { padding-top: 18px; }
}

.approved-method { line-height: 1.7; }
.approved-method h3 { margin: 28px 0 12px; font-size: 20px; }
.approved-method h4 { margin: 20px 0 8px; font-size: 16px; }
.approved-method p { margin: 12px 0; }
.approved-method li { margin: 5px 0; }
.approved-method blockquote { margin: 18px 0; padding: 8px 18px; border-left: 3px solid var(--line); }
.approved-method hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }


/* Candela · consultation-first design · 2026-10-20.
   Keep the encyclopedia logo and warm reading surfaces; BG blue and arena
   connect controls and promotions to the living BG_IMG brand palette. */
.intro-shell { padding-top: 24px; padding-bottom: 16px; }
.intro-help { max-width: 740px; margin: 10px auto 0; text-align: left; }
.intro-help summary { min-height: 44px; padding: 8px 0; color: var(--red-dark); cursor: pointer; font-size: 14px; }
.intro-help .audience-note { margin: 8px 0; }
.intro-help .home-beta-note { margin: 12px 0 0; padding: 0; text-align: left; }
.intro-help > a { color: var(--red-dark); }
.title-phrase { display: inline-block; }
.topic-index { margin: 12px 32px 0; max-width: none; padding: 0 18px; border-top-width: 1px; }
.topic-index > summary { min-height: 48px; padding: 10px 0; color: var(--red-dark); cursor: pointer; font-size: 15px; font-weight: 600; }
.topic-index[open] { padding-bottom: 18px; }
.topic-index-heading { margin-top: 6px; }
.topic-index-hint { margin-top: 10px; }
.view-description { margin: 0; padding-top: 10px; padding-bottom: 4px; }
.start-guide { background: transparent; }
.search-scope { margin-top: 12px; }
.view-tab.active { background: var(--paper-2); font-weight: 700; }
.glossary-card .card-topline { justify-content: flex-end; margin-bottom: 8px; }
.glossary-card .card-topline .tag { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.glossary-card .status { border-radius: 3px; background: var(--paper-2); color: var(--muted); font-weight: 400; }
.glossary-card h4 { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; font-family: Georgia, "Noto Serif JP", serif; font-size: 21px; }
.glossary-card h4 small { font-size: 14px; line-height: 1.7; }
.glossary-status-hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.reader-layout { grid-template-areas: "aside intro" "aside body"; }
.reader-intro { grid-area: intro; min-width: 0; padding: 36px 42px 14px; overflow-wrap: anywhere; }
.reader-intro h1 { max-width: 900px; font-size: clamp(28px, 4vw, 46px); }
.reader-article { grid-area: body; padding-top: 0; }
.reader-aside { grid-area: aside; }
.reader-toc-disclosure { min-width: 0; margin-top: 18px; }
.reader-toc-disclosure > summary { min-height: 44px; padding: 9px 0; color: var(--red-dark); cursor: pointer; font-size: 15px; font-weight: 600; }
.reader-toc { border-top: 0; padding-top: 0; }
.reader-toc ol { columns: 1; overflow-x: hidden; overflow-y: auto; }
.reader-toc a { display: block; padding: 6px 0; overflow-wrap: anywhere; }
.time-link { white-space: nowrap; }
.journey-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.yt-banner { grid-template-columns: minmax(0, 1fr); align-content: start; color: var(--ink); background: var(--white); border-color: var(--line); border-left-color: var(--red); }
.yt-banner > img { grid-row: 1; }
.yt-banner-copy { padding: 24px; }
.yt-banner-copy p, .yt-banner-playlists .yt-banner-copy p, .netclass-languages small { color: var(--muted); }
.yt-banner-action, .yt-banner-playlists .yt-banner-action { color: var(--white); background: var(--red); }
.yt-banner:hover { border-color: var(--red); }
.journey-compact { margin-top: 24px; padding-top: 18px; }
.journey-compact .journey-grid { grid-template-columns: minmax(0, 1fr); }
.journey-compact .yt-banner { border-left-width: 3px; }
.journey-compact .yt-banner > img { display: none; }
.journey-compact .yt-banner-copy { padding: 16px 18px; }
.journey-compact .yt-banner-copy h4 { margin: 9px 0 7px; font-size: 18px; }
.journey-compact .yt-banner-copy p { font-size: 14px; }
.journey-compact .netclass-languages { display: none; }
.journey-compact .yt-banner-action { margin-top: 12px; }
@media (max-width: 900px) {
  .reader-layout { grid-template-areas: "intro" "aside" "body"; }
  .reader-intro { padding: 24px 20px 12px; }
  .reader-aside { display: block; padding: 0 20px 16px; background: var(--white); }
  .reader-aside > div:first-child { display: none; }
  .reader-actions { margin: 0; }
  .reader-toc-disclosure { margin-top: 12px; border: 1px solid var(--line); border-radius: 3px; padding: 0 12px; }
  .reader-toc ol { columns: 1; max-height: none; overflow: visible; padding-right: 8px; }
  .reader-toc li { break-inside: auto; }
  .reader-toc a { padding: 8px 0; }
  .reader-article { padding: 18px 20px 32px; }
}
@media (max-width: 620px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 10px 16px 4px; }
  .brand { gap: 6px; }
  .brand-logo { width: 160px; min-width: 0; flex: 0 1 160px; }
  .brand-beta { flex: 0 0 auto; font-size: 10px; padding: 2px 4px; }
  .top-actions { width: auto; justify-content: flex-end; }
  .aa-language-picker .aa-language-trigger { padding: 8px; gap: 5px; }
  .aa-language-trigger svg { width: 16px; flex-basis: 16px; }
  .project-nav { gap: 6px 10px; }
  .project-nav a { font-size: 13px; }
  .intro-shell { padding: 16px 16px 12px; }
  .intro-shell .eyebrow { display: none; }
  .intro-shell h1 { font-size: 26px; line-height: 1.45; }
  .intro-text { line-height: 1.7; }
  .intro-help { margin-top: 4px; }
  .topic-index { margin: 10px 16px 0; padding-left: 12px; padding-right: 12px; }
  .topic-index > summary { font-size: 14px; }
  .search-scope { margin-top: 10px; }
  .view-tab { min-height: 56px; }
  .start-guide { margin-top: 10px; }
  .view-description { font-size: 14px; }
  .reader-intro h1 { font-size: 28px; line-height: 1.45; }
  .journey-grid { grid-template-columns: minmax(0, 1fr); }
}

.active-filters-summary { margin: 12px 32px 0; padding: 10px 12px; border-left: 3px solid var(--red); color: var(--red-dark); background: var(--paper-2); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 620px) { .active-filters-summary { margin-left: 16px; margin-right: 16px; } }
