/* =============================================================
   timeline.css — сворачиваемая терминальная хроника
   ============================================================= */
.chronicle-module { --chronicle-accent: #b91f24; --chronicle-surface: rgba(8, 8, 9, 0.96); margin: 20px 0; border: 1px solid rgba(255,255,255,.09); border-left: 2px solid var(--chronicle-accent); background: linear-gradient(90deg,rgba(138,3,3,.08),transparent 24%),var(--chronicle-surface); }
.chronicle-header { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:62px; padding:10px 14px; border:0; border-bottom:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.018); color:inherit; text-align:left; cursor:pointer; touch-action:manipulation; transition:background 180ms ease,border-color 180ms ease; }
.chronicle-header:hover,.chronicle-header:focus-visible { background:rgba(138,3,3,.12); outline:2px solid rgba(209,43,48,.22); outline-offset:2px; }
.chronicle-heading { display:grid; gap:4px; min-width:0; }
.chronicle-heading strong { color:#d6ccce; font:600 12px/1.25 'Courier New',monospace; letter-spacing:.11em; }
.chronicle-heading span { color:#9c9092; font:10px/1.35 'Courier New',monospace; letter-spacing:.04em; }
.chronicle-latest { color:#756d6e; font:inherit; font-weight:400; }
.chronicle-header-actions { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.chronicle-count { display:grid; place-items:center; min-width:44px; min-height:38px; border:1px solid rgba(185,31,36,.48); color:#e4d8da; background:rgba(138,3,3,.14); font:700 13px/1 'Courier New',monospace; font-variant-numeric:tabular-nums; }
.chronicle-master-glyph { min-width:30px; color:#cf3035; font:700 14px/1 'Courier New',monospace; text-align:center; }
.chronicle-body { display:grid; grid-template-rows:1fr; opacity:1; transition:grid-template-rows 220ms ease,opacity 180ms ease; }
.chronicle-body-inner { min-height:0; overflow:hidden; }
.chronicle-module.is-collapsed .chronicle-body { grid-template-rows:0fr; opacity:0; }
.chronicle-module.is-collapsed .chronicle-header { border-bottom-color:transparent; }
.chronicle-toolbar { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; padding:10px 14px 0; }
.chronicle-toolbar button { min-height:44px; padding:7px 11px; border:1px solid rgba(255,255,255,.1); background:transparent; color:#887d7f; font:9px/1.2 'Courier New',monospace; letter-spacing:.07em; cursor:pointer; transition:color 160ms ease,border-color 160ms ease,background 160ms ease; }
.chronicle-toolbar button:hover,.chronicle-toolbar button:focus-visible { border-color:rgba(185,31,36,.55); background:rgba(138,3,3,.1); color:#eee6e7; outline:2px solid rgba(209,43,48,.18); outline-offset:2px; }
.chronicle-list { position:relative; padding:8px 14px 14px 30px; }
.chronicle-list::before { content:""; position:absolute; top:22px; bottom:24px; left:18px; width:1px; background:linear-gradient(var(--chronicle-accent),rgba(185,31,36,.12)); }
.chronicle-event { --event-color:#9f9294; position:relative; border-bottom:1px dashed rgba(255,255,255,.1); animation:chronicleRecordIn 200ms ease-out both; }
.chronicle-event:last-of-type { border-bottom:0; }
.chronicle-event[data-type="political"] { --event-color:#a681c1; }
.chronicle-event[data-type="masquerade"] { --event-color:#d06064; }
.chronicle-event[data-type="inquisition"] { --event-color:#d99b55; }
.chronicle-event[data-type="personal"] { --event-color:#6cae8a; }
.chronicle-event-toggle { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:12px; align-items:center; width:100%; min-height:72px; padding:12px 8px 12px 14px; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; touch-action:manipulation; transition:background 160ms ease; }
.chronicle-event-toggle:hover,.chronicle-event-toggle:focus-visible { background:linear-gradient(90deg,rgba(138,3,3,.11),transparent); outline:2px solid rgba(209,43,48,.18); outline-offset:-2px; }
.chronicle-event-node { position:absolute; top:21px; left:-17px; width:9px; height:9px; border:2px solid #080809; outline:1px solid var(--event-color); background:var(--event-color); box-shadow:0 0 9px color-mix(in srgb,var(--event-color) 58%,transparent); }
.chronicle-event-heading { display:grid; gap:5px; min-width:0; }
.chronicle-event-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.chronicle-date,.chronicle-type,.chronicle-context,.chronicle-participants-label { font-family:'Courier New',monospace; font-variant-numeric:tabular-nums; }
.chronicle-date { color:#c7babc; font-size:11px; letter-spacing:.05em; }
.chronicle-type { padding:4px 7px; border:1px solid color-mix(in srgb,var(--event-color) 52%,transparent); color:var(--event-color); font-size:9px; letter-spacing:.08em; text-align:right; }
.chronicle-event-title { color:#eee7e8; font:600 15px/1.35 'Courier New',monospace; letter-spacing:.025em; overflow-wrap:anywhere; }
.chronicle-context { color:#817779; font-size:9px; line-height:1.4; letter-spacing:.04em; }
.chronicle-event-glyph { display:grid; place-items:center; min-width:44px; min-height:44px; border-left:1px solid rgba(255,255,255,.08); color:var(--event-color); font:700 12px/1 'Courier New',monospace; }
.chronicle-event-body-shell { display:grid; grid-template-rows:0fr; opacity:0; transition:grid-template-rows 200ms ease,opacity 160ms ease; }
.chronicle-event-body { min-height:0; overflow:hidden; padding:0 58px 0 14px; }
.chronicle-event.is-expanded .chronicle-event-body-shell { grid-template-rows:1fr; opacity:1; }
.chronicle-event.is-expanded .chronicle-event-body { padding-bottom:16px; }
.chronicle-event.is-expanded .chronicle-event-toggle { background:rgba(255,255,255,.012); }
.chronicle-summary { max-width:72ch; margin:4px 0 0; color:#c6bdbf; font:13px/1.65 'Courier New',monospace; white-space:pre-line; }
.chronicle-participants { display:grid; gap:8px; margin-top:13px; padding-top:11px; border-top:1px solid rgba(255,255,255,.06); }
.chronicle-participants-label { color:#948789; font-size:9px; letter-spacing:.1em; }
.chronicle-character-links { display:flex; flex-wrap:wrap; gap:8px; }
button.chronicle-character,.chronicle-character.is-unavailable { display:inline-flex; align-items:center; min-height:44px; padding:7px 11px; border:1px solid rgba(185,31,36,.4); background:rgba(138,3,3,.09); color:#d9cdcf; font:11px/1.25 'Courier New',monospace; }
button.chronicle-character { cursor:pointer; touch-action:manipulation; transition:color 160ms ease,border-color 160ms ease,background 160ms ease,transform 160ms ease; }
button.chronicle-character:hover,button.chronicle-character:focus-visible { border-color:#d12b30; background:rgba(138,3,3,.24); color:#fff; outline:2px solid rgba(209,43,48,.22); outline-offset:2px; }
button.chronicle-character:active { transform:scale(.97); }
.chronicle-character.is-unavailable { border-style:dashed; border-color:#373234; background:transparent; color:#72696b; }
.chronicle-toggle { width:100%; min-height:44px; margin-top:8px; border:1px solid rgba(185,31,36,.38); background:linear-gradient(90deg,rgba(138,3,3,.12),transparent); color:#c7babc; font:10px/1.2 'Courier New',monospace; letter-spacing:.08em; cursor:pointer; touch-action:manipulation; transition:color 160ms ease,border-color 160ms ease,background 160ms ease; }
.chronicle-toggle:hover,.chronicle-toggle:focus-visible { border-color:#d12b30; background:rgba(138,3,3,.2); color:#fff; outline:2px solid rgba(209,43,48,.2); outline-offset:2px; }
.chronicle-extra.hidden { display:none !important; }
.chronicle-empty { display:grid; gap:6px; min-height:112px; place-content:center; text-align:center; }
.chronicle-empty strong { color:#a99c9e; font:11px/1.3 'Courier New',monospace; letter-spacing:.08em; }
.chronicle-empty span { max-width:42ch; color:#84797b; font:12px/1.5 'Courier New',monospace; }
@keyframes chronicleRecordIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:680px) {
    .chronicle-module { margin:16px 0; }
    .chronicle-header { align-items:center; padding:10px 9px 10px 12px; }
    .chronicle-heading span { max-width:25ch; }
    .chronicle-latest { display:block; margin-top:3px; }
    .chronicle-header-actions { gap:3px; }
    .chronicle-count { min-width:38px; }
    .chronicle-toolbar { justify-content:stretch; padding:8px 8px 0; }
    .chronicle-toolbar button { flex:1 1 150px; }
    .chronicle-list { padding:6px 8px 10px 24px; }
    .chronicle-list::before { left:13px; }
    .chronicle-event-toggle { grid-template-columns:minmax(0,1fr) 44px; padding:12px 2px 12px 12px; }
    .chronicle-event-node { left:-16px; }
    .chronicle-event-header { align-items:flex-start; flex-direction:column; gap:7px; }
    .chronicle-type { text-align:left; }
    .chronicle-event-title { font-size:14px; }
    .chronicle-event-body { padding-right:8px; padding-left:12px; }
    .chronicle-summary { font-size:13px; }
    button.chronicle-character,.chronicle-character.is-unavailable { width:100%; justify-content:center; }
}
@media (prefers-reduced-motion:reduce) { .chronicle-event { animation:none; } .chronicle-header,.chronicle-body,.chronicle-event-toggle,.chronicle-event-body-shell,button.chronicle-character,.chronicle-toggle,.chronicle-toolbar button { transition-duration:.01ms !important; } }
