.tl-track { --lbl: 210px; position: relative; margin-top: 14px; display: grid; grid-template-columns: var(--lbl) 1fr; }
.tl-axis, .tl-lane { grid-column: 2; position: relative; }
.tl-axis { height: 20px; color: var(--muted); font-size: 13px; }
.tl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-label { grid-column: 1; color: var(--muted); font-size: 14px; align-self: center; display: flex; gap: 6px;
  align-items: center; min-width: 0; padding-right: 8px; }
.tl-label img { width: 18px; height: 18px; border-radius: 3px; flex: none; }
.tl-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-label .tot { margin-left: auto; padding-left: 6px; color: var(--text); font-variant-numeric: tabular-nums; flex: none; }
.tl-label.avoidable span:first-of-type { color: var(--avoid); }
.tl-lane { border-top: 1px solid var(--line); min-height: 38px; }
.tl-lane.dot { min-height: 30px; }
.tl-lane.last { border-bottom: 1px solid var(--line); }
.tl-grid { position: absolute; top: 20px; bottom: 0; left: var(--lbl); right: 0; pointer-events: none; }
.tl-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); opacity: .55; }
.tl-grid .dead { width: 2px; background: var(--avoid); opacity: 1; }
.tl-hp { position: absolute; z-index: 1; top: 20px; bottom: 0; left: var(--lbl); width: calc(100% - var(--lbl));
  height: calc(100% - 20px); pointer-events: none; }
.tl-ic { position: absolute; z-index: 2; transform: translateX(-50%); display: block; width: 28px; height: 28px;
  border-radius: 6px; border: 2px solid #3b4d5e; background: #0f161d; }
.tl-ic img { width: 100%; height: 100%; border-radius: 4px; display: block; }
.tl-ic.def { border-color: var(--def); box-shadow: 0 0 0 1px var(--def); }
.tl-ic.greed { border-color: var(--avoid); box-shadow: 0 0 0 1px var(--avoid); }
.tl-ic.hit.avoidable { border-color: var(--avoid); } .tl-ic.hit.unsurvivable { border-color: var(--unsurv); }
.tl-ic.hit.unavoidable, .tl-ic.hit.untagged { border-color: #56687a; }
.tl-ic.hit.killing { box-shadow: 0 0 0 2px var(--avoid); }
.tl-ic.heal { width: 22px; height: 22px; border-color: var(--heal); }
.tl-ct { position: absolute; height: 3px; background: #4b6074; border-radius: 2px; }
.tl-aura { position: absolute; top: 5px; bottom: 5px; border-radius: 3px; background: rgba(147, 166, 183, .16);
  border-left: 2px solid rgba(147, 166, 183, .55); font-size: 12px; color: var(--muted); padding-left: 3px;
  overflow: hidden; white-space: nowrap; }
.tl-lane.avoidable .tl-aura { background: rgba(240, 119, 90, .14); border-left-color: rgba(240, 119, 90, .6); }
.tl-tick { position: absolute; z-index: 2; bottom: 4px; width: 7px; transform: translateX(-50%); cursor: default; }
.tl-tick::after { content: ""; position: absolute; left: 2px; bottom: 0; width: 3px; height: 100%; border-radius: 2px;
  background: #a9bccd; }
.tl-lane.avoidable .tl-tick::after { background: var(--avoid); }
.tl-readout { min-height: 22px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tl-readout em { color: var(--muted); font-style: normal; }
.tl-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 6px; color: var(--muted); }
.tl-stats b { color: var(--text); font-weight: 600; }
.tl-stats b.bad { color: var(--avoid); }
.tl-log { margin-top: 10px; }
.tl-log summary { cursor: pointer; color: var(--muted); }
.tl-log .wrap { overflow-x: auto; }
.tl-log table { border-collapse: collapse; margin-top: 8px; width: 100%; font-variant-numeric: tabular-nums; }
.tl-log th, .tl-log td { text-align: left; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tl-log th { color: var(--muted); font-weight: 500; }
.tl-log td a { color: var(--text); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.tl-log td a img { width: 18px; height: 18px; border-radius: 3px; }
.tl-log td.num { text-align: right; }
@media (max-width: 640px) { .tl-track { --lbl: 44px; } .tl-label { font-size: 12px; } .tl-label.dotlabel span { display: none; }
  .tl-ic { width: 24px; height: 24px; } .tl-ic.heal { width: 20px; height: 20px; } }

.tl-seqwrap { margin-top: 14px; }
.tl-seqlabel { color: var(--muted); font-size: 14px; }
.tl-seq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 4px; margin-top: 8px; }
.tl-seqi { display: grid; justify-items: center; gap: 1px; width: 46px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-seqi a { display: block; width: 34px; height: 34px; border: 2px solid #3b4d5e; border-radius: 6px; background: #0f161d; }
.tl-seqi a img { width: 100%; height: 100%; border-radius: 4px; display: block; }
.tl-seqi.def a { border-color: var(--def); box-shadow: 0 0 0 1px var(--def); }
.tl-seqi.greed a { border-color: var(--avoid); box-shadow: 0 0 0 1px var(--avoid); }
.tl-seqi .t { color: var(--muted); }
.tl-seqi.greed .hp { color: var(--avoid); font-weight: 700; }
.tl-gap { align-self: center; color: var(--muted); font-size: 12px; padding: 2px 6px; margin-top: 8px;
  border: 1px dashed var(--line); border-radius: 4px; white-space: nowrap; }
.tl-seqend { align-self: center; margin-top: 8px; color: var(--avoid); font-weight: 700; padding-left: 4px; }
.tl-earlier { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 12px; color: var(--muted); }
.tl-earlier .item { display: inline-flex; gap: 6px; align-items: center; color: var(--text); }
.tl-earlier .item em { color: var(--muted); font-style: normal; }
.tl-earlier img { width: 20px; height: 20px; border-radius: 4px; }

.tl-recap { margin-top: 16px; }
.tl-win { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); }
.tl-win button { font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 10px; cursor: pointer; }
.tl-win button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tl-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 28px; margin-top: 10px; }
.tl-panel h4 { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-size: 16px; font-weight: 600;
  padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.tl-panel h4 b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-row { display: grid; gap: 8px; align-items: center; padding: 5px 0 5px 6px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; border-left: 3px solid transparent; }
.tl-row.dmg { grid-template-columns: 50px 1fr auto 88px; }
.tl-row.cast { grid-template-columns: 52px 1fr 88px; }
.tl-row.heal { grid-template-columns: minmax(80px, 110px) 1fr auto; align-items: start; }
.tl-row.avoidable { border-left-color: var(--avoid); }
.tl-row.greed { border-left-color: var(--avoid); }
.tl-row.def { border-left-color: var(--def); }
.tl-t { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tl-what { display: flex; gap: 6px; align-items: center; min-width: 0; }
.tl-what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-panel a { display: inline-flex; flex: none; }
.tl-panel a img { width: 18px; height: 18px; border-radius: 3px; }
.tl-amt { text-align: right; font-weight: 600; }
.tl-row.dmg.avoidable .tl-amt { color: var(--avoid); }
.tl-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-spells { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 14px; }
.tl-spell { display: inline-flex; gap: 5px; align-items: center; }
.tl-tag { font-style: normal; font-size: 12px; padding: 0 6px; border-radius: 4px; flex: none; }
.tl-tag.bad { background: rgba(240, 119, 90, .18); color: var(--avoid); }
.tl-tag.def { background: rgba(233, 196, 106, .16); color: var(--def); }
.tl-hpc { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.tl-hpc .track { width: 40px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tl-hpc .track i { display: block; height: 100%; border-radius: 3px; background: currentColor; }
.tl-hpc b { font-weight: 600; min-width: 36px; text-align: right; }
.tl-hpc.ok { color: var(--ok); } .tl-hpc.mid { color: var(--def); } .tl-hpc.low { color: var(--avoid); }
.tl-hpc.none { color: var(--muted); }
.tl-none { color: var(--muted); margin: 6px 0; }
.tl-what .nm { display: grid; min-width: 0; line-height: 1.2; }
.tl-what .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-what .nm small { color: var(--muted); font-size: 12px; }
.tl-spell em { font-style: normal; color: var(--text); opacity: .75; }
@media (max-width: 640px) {
  .tl-hpc .track { display: none; }
  .tl-row.dmg { grid-template-columns: 46px 1fr auto 42px; }
  .tl-row.cast { grid-template-columns: 46px 1fr 42px; }
  .tl-hpc b { min-width: 0; }
}
