.lm-chronicle {
    --paper: #f5edde;
    --ink: #292c23;
    --red: #78432f;
    --rule: #cbb99a;
    color: var(--ink);
    background: linear-gradient(125deg, #faf5ea, var(--paper) 65%);
    border-bottom: 1px solid var(--rule);
    scroll-margin-top: 1.5rem;
}

.lm-chronicle-wrap {
    width: min(1240px, 90%);
    margin-inline: auto;
    padding-block: clamp(2.8rem, 6vw, 6rem);
}

.lm-chronicle-head {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: end;
    gap: clamp(1.5rem, 5vw, 5rem);
}

.lm-chronicle-label,
.lm-chapter-time {
    font: 650 .78rem/1.55 system-ui, sans-serif;
    letter-spacing: .07em;
}

.lm-chronicle-label {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0 0 .65rem;
    color: var(--red);
    text-transform: uppercase;
}

.lm-chronicle-label::before {
    content: "";
    width: 2.3rem;
    height: 2px;
    background: #ab8952;
}

.lm-chronicle h2 {
    margin: 0;
    color: #3d3328;
    font: 480 clamp(2.3rem, 4.35vw, 4.55rem)/1.1 var(--sp-serif);
    letter-spacing: -.035em;
}

.lm-chronicle h2 em {
    display: block;
    font-weight: 460;
    color: var(--red);
}

.lm-chronicle-deck {
    max-width: 49ch;
    margin: 0 0 .1rem;
    color: #4e473b;
    font: 400 clamp(1.03rem, 1.35vw, 1.18rem)/1.65 var(--sp-serif);
}

.lm-chapters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(.2rem, 1.4vw, 1.15rem);
    margin: clamp(1.5rem, 3vw, 3rem) 0 clamp(1.15rem, 2vw, 1.8rem);
}

.lm-chapters a {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    min-height: 44px;
    padding: .65rem .2rem .15rem 0;
    border-top: 2px solid var(--rule);
    color: #50493b;
    text-decoration: none;
    font: 570 clamp(.88rem, 1.6vw, 1.13rem)/1.35 var(--sp-serif);
}

.lm-chapters a[aria-current="step"],
.lm-chapters a:hover {
    color: var(--red);
    border-color: var(--red);
}

.lm-chapters a[aria-current="step"] .lm-chapter-number {
    background: var(--red);
    color: #fff6e2;
}

.lm-chapter-number {
    display: inline-grid;
    place-items: center;
    min-width: 2.1em;
    padding: .18em .3em;
    border: 1px solid #cfbea1;
    border-radius: 2px;
    font: 650 .74rem/1.3 system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

.lm-chapter {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    align-items: stretch;
    margin: 0;
    color: #fcf4e3;
    background: #24372f;
    scroll-margin-top: 1rem;
}

.lm-chapter:not(:first-child) { margin-top: 1.4rem; }
.lm-chronicle.is-interactive .lm-chapter { margin: 0; }
.lm-chronicle [hidden] { display: none !important; }

.lm-chapter figure {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
    margin: 0;
    background: #222c23;
}

.lm-chapter img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    aspect-ratio: 3 / 2;
}

.lm-chapter figcaption {
    margin: 0;
    padding: .55rem 1rem .65rem;
    color: #e6d9bf;
    background: #273229;
    font: 450 .79rem/1.45 system-ui, sans-serif;
}

.lm-chapter-copy { align-self: center; padding: clamp(1.45rem, 3vw, 3rem); }

.lm-chapter-time {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    margin: 0 0 1rem;
    color: #ead3a0;
}

.lm-chapter-time span {
    color: #f3d799;
    border-right: 1px solid #9e976f;
    padding-right: .75rem;
    font-variant-numeric: tabular-nums;
}

.lm-chapter h3 {
    margin: 0 0 1.05rem;
    color: #fff4dc;
    font: 510 clamp(1.75rem, 2.8vw, 2.7rem)/1.14 var(--sp-serif);
    letter-spacing: -.026em;
}

.lm-chapter-copy > p:not(.lm-chapter-time) {
    margin: 0 0 .75rem;
    color: #f2ecde;
    font: 400 clamp(1rem, 1.06vw, 1.08rem)/1.58 var(--sp-serif);
}

.lm-chapter-copy > :last-child { margin-bottom: 0; }
.lm-chapter-tour { display: inline-block; margin-top: .2rem; color: #ffda97; text-underline-offset: .23em; }
.lm-chapter-tour:hover { color: white; }

.lm-chronicle-foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem 2rem;
    flex-wrap: wrap;
    padding-top: 1.1rem;
}

.lm-chapter-controls { display: flex; align-items: center; gap: .9rem; }
.lm-chapter-controls button {
    min-height: 44px;
    padding: .38rem .85rem;
    border: 1px solid #988463;
    border-radius: 2px;
    background: transparent;
    color: #493c2b;
    font: 600 .93rem/1.3 system-ui, sans-serif;
}

.lm-chapter-controls button:hover:enabled { color: #fff8eb; background: #684630; }
.lm-chapter-controls button:disabled { opacity: .45; cursor: default; }
.lm-chapter-controls [role="status"] { font: 500 .84rem/1.4 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.lm-chronicle-sources { max-width: 57ch; color: #51473a; font: 400 .9rem/1.6 system-ui, sans-serif; }
.lm-chronicle-sources summary { cursor: pointer; padding-block: .55rem; color: #67442c; }
.lm-chronicle-sources p { margin: .35rem 0 .55rem; }
.lm-chronicle-sources ul { margin: 0; padding-inline-start: 1.1rem; }
.lm-chronicle-sources a { color: #6b402d; text-underline-offset: .17em; }
.lm-chronicle :is(a, button, summary):focus-visible { outline: 3px solid #ad6834; outline-offset: 3px; }

@media (max-width: 850px) {
    .lm-chronicle-head { grid-template-columns: 1fr; gap: 1rem; }
    .lm-chronicle-deck { max-width: 68ch; }
    .lm-chapter { grid-template-columns: 1fr; }
    .lm-chapter figure img { height: auto; max-height: 32rem; object-fit: cover; }
    .lm-chapter-copy { padding: 1.5rem clamp(1.25rem, 4.5vw, 2.5rem) 1.8rem; }
}

@media (max-width: 575px) {
    .lm-chronicle-wrap { width: 92%; }
    .lm-chapters a { flex-direction: column; gap: .35rem; align-items: flex-start; font-size: .83rem; }
    .lm-chapter-number { font-size: .7rem; }
    .lm-chapter-copy { padding: 1.3rem 1.15rem 1.55rem; }
    .lm-chapter figcaption { padding-inline: .75rem; }
    .lm-chronicle-foot { gap: .55rem; flex-direction: column; }
}

@media print {
    .lm-chronicle .lm-chapter[hidden] { display: grid !important; margin-top: 1rem; }
    .lm-chapter { break-inside: avoid; }
    .lm-chapters, .lm-chronicle .lm-chapter-controls { display: none; }
}
