/* Opt-in reading layout for features and rankings. Every rule is scoped.
   Shared site chrome, dictionaries, ad units and affiliate code keep their CSS. */
.history-article {
  --article-accent: #9c3028;
  --article-rule: #ddd4c5;
  max-width: 760px;
  margin-inline: auto;
  color: var(--ink, #1a1a2e);
  font-size: 1rem;
  line-height: 1.95;
  overflow-wrap: break-word;
  line-break: strict;
}
.history-article .history-article__header { border-top: 3px solid var(--article-accent); padding-top: 16px; }
.history-article .history-article__category { display: inline-block; margin: 0 12px 12px 0; color: var(--article-accent); font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
.history-article .history-article__kicker { display: inline-block; margin: 0 0 12px; color: #59534b; font-size: .875rem; }
.history-article h1 { margin: 0 0 24px; font-size: clamp(1.875rem, 4.2vw, 2.625rem); line-height: 1.5; letter-spacing: .025em; }
.history-article .history-article__subtitle { display: block; margin-top: 8px; font-size: clamp(1.125rem, 2.8vw, 1.625rem); line-height: 1.6; letter-spacing: 0; }
.history-article :is(h1, h2, h3, summary, .history-article__quick-link, .history-article__feature, .history-article__dictionary-link) { word-break: keep-all; overflow-wrap: anywhere; }
.history-article .history-article__lead { font-size: 1.0625rem; line-height: 1.95; }
.history-article p { margin: 0 0 1.25em; }
.history-article .history-article__lead p:last-child { margin-bottom: 0; }
.history-article .history-article__dates { font-size: .8rem; color: #59534b; margin-bottom: 16px; }
.history-article .history-article__hero { margin: 0 0 24px; }
.history-article .history-article__hero-portraits { display: grid; grid-template-columns: repeat(var(--article-portrait-count, 3), minmax(0, 1fr)); gap: 2px; height: clamp(150px, 28vw, 240px); overflow: hidden; border-radius: 4px; background: #202225; }
.history-article .history-article__hero-person { position: relative; min-width: 0; min-height: 0; }
.history-article .history-article__hero-person img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.history-article .history-article__hero-person > span { position: absolute; inset: auto 0 0; padding: 24px 4px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .9)); color: #fff; text-align: center; font-size: clamp(.75rem, 1.8vw, 1rem); font-weight: 600; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.history-article .history-article__hero figcaption { line-height: 1.7; }
.history-article .history-article__takeaway { margin: 24px 0 0; padding: 16px 20px; background: #f3eee5; border-left: 3px solid var(--article-accent); }
.history-article .history-article__label { display: block; margin-bottom: 8px; font-size: .75rem; font-weight: 700; color: var(--article-accent); }
.history-article .history-article__takeaway p { margin: 0; font-weight: 500; }
.history-article .history-article__toc { margin: 24px 0 32px; border-block: 1px solid var(--article-rule); }
.history-article .history-article__quick-link { display: block; padding: 14px 4px; color: var(--article-accent); font-weight: 700; font-size: .9375rem; }
.history-article .history-article__toc details { border-top: 1px solid var(--article-rule); }
.history-article .history-article__toc summary { padding: 12px 4px; min-height: 48px; cursor: pointer; font-size: .875rem; font-weight: 600; }
.history-article .history-article__toc-count { margin-left: 12px; color: #59534b; font-size: .75rem; font-weight: 400; }
.history-article .history-article__toc-close { display: none; }
.history-article details[open] .history-article__toc-close { display: inline; }
.history-article details[open] .history-article__toc-open { display: none; }
.history-article .history-article__toc ol { padding: 0 12px 16px 2em; }
.history-article .history-article__toc li::marker { color: var(--article-accent); font-size: .8rem; }
.history-article .history-article__toc li a { display: block; padding: 10px 4px; min-height: 44px; font-size: .875rem; text-decoration: underline; text-underline-offset: 4px; }
.history-article .article-intro { font-size: 1rem; line-height: 1.95; color: #333; margin-bottom: 24px; }
.history-article .article-body { max-width: 100%; margin: 0; }
.history-article .article-body p { line-height: 1.95; }
.history-article :is(.juyushi-chapter, .history-article__ranking-item) { margin-block: 48px; }
.history-article .juyushi-chapter + .juyushi-chapter { padding-top: 0; border-top: 0; }
.history-article h2 { margin: 0 0 24px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--article-rule); border-image: none; font-size: clamp(1.375rem, 3vw, 1.75rem); line-height: 1.6; }
.history-article h3 { margin: 28px 0 12px; font-size: 1.125rem; line-height: 1.6; }
.history-article [id] { scroll-margin-top: 96px; }
.history-article a:focus-visible, .history-article summary:focus-visible { outline: 3px solid var(--article-accent); outline-offset: 4px; border-radius: 2px; }
.history-article .juyushi-members { gap: 12px; }
.history-article .juyushi-member { padding: 18px 16px; gap: 16px; border-radius: 4px; box-shadow: none; }
.history-article .juyushi-member .juyushi-portrait { width: 72px; height: 88px; border-radius: 3px; }
.history-article .juyushi-member h3 { margin: 0 0 4px; }
.history-article .juyushi-member p { line-height: 1.8; }
.history-article .juyushi-read { color: var(--article-accent); font-size: .8125rem; }
.history-article .juyushi-next { border-radius: 4px; }
.history-article .ad-slot-label { color: #59534b; }
.history-article .juyushi-sources { line-height: 1.9; font-size: .875rem; }
.history-article .history-article__rank { display: inline-block; margin-right: 12px; color: var(--article-accent); }
.history-article .history-article__ranking-item figure { margin: 24px 0; }
.history-article .history-article__ranking-item img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; }
.history-article figcaption { font-size: .8rem; color: #59534b; margin-top: 8px; }
.history-article .history-article__feature { font-weight: 700; }
.history-article .history-article__dictionary-link { display: inline-block; padding: 12px 0; color: var(--article-accent); text-decoration: underline; text-underline-offset: 4px; }
/* Guides opt in individually; existing dictionary and guide-reader CSS stays intact. */
.history-article--guide .article-body > h2 { margin-top: 48px; }
.history-article--guide .history-article__takeaway h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: 1.125rem; }
.history-article--guide .history-article__takeaway ul { margin: 12px 0 0; padding-left: 1.25em; }
.history-article--guide .history-article__takeaway li + li { margin-top: 8px; }
.history-article--guide .reader-figure-copy h3 { margin: 5px 0 7px; font-size: 1.125rem; }
.history-article--guide .reader-figure-copy p { margin: 0; line-height: 1.8; }
.history-article--guide .reader-route-card h3 { margin: 7px 0; }
.history-article--guide .reader-route-card p { margin: 0; }
.history-article--guide .reader-route-card :is(h3, p), .history-article--guide .reader-figure-copy :is(h3, b) { word-break: keep-all; overflow-wrap: anywhere; }
.history-article .history-article__table-scroll { width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid var(--article-rule); border-radius: 4px; }
.history-article .history-article__table-scroll:focus-visible { outline: 3px solid var(--article-accent); outline-offset: 3px; }
.history-article .history-article__table-scroll .info-table { min-width: 580px; width: 100%; max-width: none; margin: 0; font-size: .875rem; }
.history-article .history-article__table-scroll th { width: auto; }
.history-article .history-article__table-hint { margin: 0; font-size: .8rem; color: #59534b; }
@media (max-width: 900px) {
  .history-article--guide .reader-figure-row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 768px) {
  .history-article { font-size: 1.0625rem; }
  .history-article .history-article__header { padding-top: 24px; }
  .history-article .history-article__lead { font-size: 1.125rem; }
  .history-article .article-intro { font-size: 1.0625rem; }
}
@media (max-width: 600px) {
  .history-article .juyushi-next-grid { grid-template-columns: minmax(0, 1fr); }
  .history-article :is(.juyushi-chapter, .history-article__ranking-item) { margin-block: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .history-article *, .history-article *::before, .history-article *::after { animation: none; transition: none; }
}

.history-article .juyushi-cast-card h3 { margin: 0 0 4px; }
.history-article .history-article__takeaway .juyushi-context { padding: 0; background: transparent; border-radius: 0; color: inherit; }
