/* Each event stays on its original region's side of the central timeline. */
html.history-index{ overflow-y:scroll; }
.history-page{ --history-text:#2f343c; --history-muted:#687680; --history-line:#d6ddd5; --history-bg:#fafafa; --history-gap:64px; }
.history-page .main{ padding:24px 0 88px; }
.history-page .general-head,
.history-page .history{ width:min(1100px,95%); max-width:1100px; margin-left:auto; margin-right:auto; }
.history-timeline{ position:relative; display:grid; gap:40px; padding-bottom:24px; }
.history-timeline::before{ content:""; position:absolute; top:18px; bottom:0; left:50%; width:2px; transform:translateX(-50%); background:var(--history-line); }
.history-row{ --history-node:#8e9b91; position:relative; display:grid; grid-template-columns:minmax(0,1fr) var(--history-gap) minmax(0,1fr); align-items:start; }
.history-row--japan{ --history-node:#62b850; }
.history-row::before{ content:""; position:absolute; top:13px; left:50%; width:10px; height:10px; box-sizing:border-box; transform:translateX(-50%); border:2px solid var(--history-node); border-radius:50%; background:var(--history-bg); z-index:1; }
.history-reveal-ready .history-row{ opacity:0; transform:translateY(18px); transition:opacity .85s ease,transform 1s cubic-bezier(.22,1,.36,1); }
.history-reveal-ready .history-row.is-visible{ opacity:1; transform:none; }
.history-event{ position:relative; grid-row:1; width:100%; max-width:480px; min-width:0; }
.history-event--world{ grid-column:1; justify-self:end; text-align:right; }
.history-event--japan{ grid-column:3; justify-self:start; }
.history-event::before{ content:""; position:absolute; top:17px; width:calc(var(--history-gap)/2); height:1px; background:var(--history-line); }
.history-event--world::before{ right:calc(var(--history-gap)/-2); }
.history-event--japan::before{ left:calc(var(--history-gap)/-2); }
.history-date{ margin:0 0 16px; color:var(--history-muted); font-size:24px; font-weight:700; line-height:1.5; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.history-event--world .history-date{ text-align:right; }
.history-event--japan .history-date{ color:#62b850; }
.history-image{ display:grid; gap:10px; width:80%; max-width:360px; margin:14px 0 0; }
.history-event--world .history-image{ margin-left:auto; }
.history-image-link{ display:block; min-width:0; line-height:0; }
.history-image-link[href]:focus-visible{ outline:2px solid var(--history-muted); outline-offset:4px; }
.history-image img{ display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; border:0; border-radius:0; background:var(--history-line); }
.history-text{ margin:0; color:var(--history-text); font-size:16px; font-weight:500; line-height:1.8; overflow-wrap:anywhere; }
.history-event--world .history-text{ width:fit-content; max-width:100%; margin-left:auto; text-align:left; }
.history-note{ color:var(--history-muted); font-size:12px; font-weight:400; line-height:1.6; }
.history-text a,.history-text a:visited{ color:#286b8b; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.history-text a:hover{ color:#62b850; }
.history-text a:focus-visible{ outline:2px solid var(--history-muted); outline-offset:3px; }
.history-page button.history-scroll-top{ position:fixed; right:max(24px,calc(50vw - 636px)); bottom:24px; }
[data-theme="dark"] .history-page{ --history-text:#d1d5db; --history-muted:#afb8b2; --history-line:#4d594e; --history-bg:#303030; }
[data-theme="dark"] .history-text a,[data-theme="dark"] .history-text a:visited{ color:#86c9e3; }
[data-theme="dark"] .history-text a:hover{ color:#62b850; }
@media(max-width:900px){
  .history-page{ --history-gap:48px; }
  .history-text{ font-size:15px; }
}
@media(max-width:600px){
  .history-page{ --history-gap:28px; }
  .history-page .main{ padding-bottom:56px; }
  .history-page .general-head,.history-page .history{ width:calc(100% - 32px); }
  .history-timeline{ gap:32px; }
  .history-row::before{ top:14px; width:8px; height:8px; }
  .history-date{ margin-bottom:12px; }
  .history-image{ width:100%; margin-top:10px; }
  .history-text{ font-size:13px; line-height:1.8; }
}
@media(prefers-reduced-motion:reduce){
  .history-reveal-ready .history-row{ opacity:1; transform:none; transition:none; }
}
